Only return the usage data for live services.

The list of trail mode services is only for platform admins, therefore the usage isn't needed for that page.
This commit is contained in:
Rebecca Law
2020-02-24 14:19:12 +00:00
parent 18f272dc2b
commit b1b457eea0
3 changed files with 217 additions and 5 deletions

View File

@@ -31,6 +31,13 @@ def dao_get_organisation_services(organisation_id):
).one().services
def dao_get_organisation_live_services(organisation_id):
return Service.query.filter_by(
organisation_id=organisation_id,
restricted=False
).all()
def dao_get_organisation_by_id(organisation_id):
return Organisation.query.filter_by(id=organisation_id).one()