Add count of live services to organisations

This makes it clear that these are something different to the trial
mode services, in that they are a container of multiple things.
This commit is contained in:
Chris Hill-Scott
2019-06-07 09:58:09 +01:00
parent 722d1f0af4
commit 3be1f79cf9
4 changed files with 51 additions and 12 deletions

View File

@@ -270,7 +270,10 @@ class User(JSONModel, UserMixin):
@property
def organisations(self):
return self.orgs_and_services['organisations']
return [
Organisation.from_id(organisation['id'])
for organisation in self.orgs_and_services['organisations']
]
@property
def organisation_ids(self):