mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Stop making multiple API calls to get_organisation
The count of live services is coming back from the `/organisations` response. We don’t need to get each organisation individually now.
This commit is contained in:
@@ -294,7 +294,7 @@ class User(JSONModel, UserMixin):
|
||||
@property
|
||||
def organisations(self):
|
||||
return [
|
||||
Organisation.from_id(organisation['id'])
|
||||
Organisation(organisation)
|
||||
for organisation in self.orgs_and_services['organisations']
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user