Remove deprecated fields from orgs and services

Once the admin app has started using the new fields returned in
https://github.com/alphagov/notifications-api/pull/2539 these fields
won’t be needed any more.
This commit is contained in:
Chris Hill-Scott
2019-06-12 11:09:36 +01:00
parent 175f56da90
commit 4dd245ca87
2 changed files with 0 additions and 71 deletions

View File

@@ -507,35 +507,10 @@ def get_orgs_and_services(user):
{
'name': org.name,
'id': org.id,
'services': [
{
'id': service.id,
'name': service.name,
'restricted': service.restricted,
}
for service in org.services
if service.active and service in user.services
],
'count_of_live_services': len(org.live_services),
}
for org in user.organisations if org.active
],
'services_without_organisations': [
{
'id': service.id,
'name': service.name,
'restricted': service.restricted,
} for service in user.services
if (
service.active and
# include services that either aren't in an organisation, or are in an organisation,
# but not one that the user can see.
(
not service.organisation or
service.organisation not in user.organisations
)
)
],
'services': [
{
'id': service.id,