We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3474740 commit b2a16a0Copy full SHA for b2a16a0
clerk/organizations.py
@@ -9,9 +9,9 @@ class OrganizationsService(Service):
9
10
async def list(self) -> List[types.Organization]:
11
"""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")]
+ async with self._client.get(self.endpoint) as resp:
+ resp_json = await r.json()
+ return [types.Organization.parse_obj(obj) for obj in s.get("data", [])]
15
16
async def get(self, organization_id: str) -> types.Organization:
17
"""Retrieve an organization by their id"""
0 commit comments