mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user