Skip to content

Commit b2a16a0

Browse files
Eilandistizz98
authored andcommitted
Apply suggestions from code review
Co-authored-by: Elijah Wilson <5739698+tizz98@users.noreply.github.com>
1 parent 3474740 commit b2a16a0

File tree

3 files changed

+400
-87
lines changed

3 files changed

+400
-87
lines changed

clerk/organizations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ class OrganizationsService(Service):
99

1010
async def list(self) -> List[types.Organization]:
1111
"""Retrieve a list of all organizations"""
12-
async with self._client.get(self.endpoint) as r:
13-
s = await r.json()
14-
return [types.Organization.parse_obj(s) for s in s.get("data")]
12+
async with self._client.get(self.endpoint) as resp:
13+
resp_json = await r.json()
14+
return [types.Organization.parse_obj(obj) for obj in s.get("data", [])]
1515

1616
async def get(self, organization_id: str) -> types.Organization:
1717
"""Retrieve an organization by their id"""

0 commit comments

Comments
 (0)