Merge pull request #3840 from alphagov/accounts-page-fix

Fix /accounts page to only show trial services once
This commit is contained in:
Katie Smith
2021-03-17 15:29:07 +00:00
committed by GitHub
4 changed files with 14 additions and 21 deletions

View File

@@ -289,13 +289,6 @@ class User(JSONModel, UserMixin):
if self.belongs_to_organisation(service.organisation_id)
]
@property
def services_without_organisations(self):
return [
service for service in self.services
if not self.belongs_to_organisation(service.organisation_id)
]
@property
def service_ids(self):
return self._dict['services']
@@ -312,12 +305,6 @@ class User(JSONModel, UserMixin):
service for service in self.services if service.live
]
@property
def live_services_not_belonging_to_users_organisations(self):
return self.sort_services(
set(self.live_services).union(self.services_without_organisations)
)
@property
def organisations(self):
return [