Only show live services without an organisation

In reality we shouldn’t have any live services that don’t have an
organisation. But we probably do locally, in preview, etc., and we
shouldn’t lose a way of accessing them.
This commit is contained in:
Chris Hill-Scott
2019-06-07 10:07:14 +01:00
parent 3be1f79cf9
commit f774a10e3a
4 changed files with 33 additions and 26 deletions

View File

@@ -268,6 +268,13 @@ class User(JSONModel, UserMixin):
if not service['restricted']
]
@property
def live_services_not_belonging_to_users_organisations(self):
return [
service for service in self.orgs_and_services['services_without_organisations']
if not service['restricted']
]
@property
def organisations(self):
return [