From edda816ffa2abfb513035e34484ee88d6d7c2871 Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Fri, 19 Jul 2019 15:13:24 +0100 Subject: [PATCH] Temporarily add generic 'nhs' --- app/dao/services_dao.py | 2 +- app/models.py | 2 +- migrations/versions/0299_org_types_table.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/dao/services_dao.py b/app/dao/services_dao.py index b4fee76c6..bf20f6f4b 100644 --- a/app/dao/services_dao.py +++ b/app/dao/services_dao.py @@ -288,7 +288,7 @@ def dao_create_service( service.crown = organisation.crown elif service.organisation_type in CROWN_ORGANISATION_TYPES: service.crown = True - elif service.organisation_type in (NON_CROWN_ORGANISATION_TYPES + ['nhs']): + elif service.organisation_type in NON_CROWN_ORGANISATION_TYPES: service.crown = False service.count_as_live = not user.platform_admin diff --git a/app/models.py b/app/models.py index 125136457..3a40d8924 100644 --- a/app/models.py +++ b/app/models.py @@ -330,7 +330,7 @@ ORGANISATION_TYPES = [ ] CROWN_ORGANISATION_TYPES = ["nhs_central"] -NON_CROWN_ORGANISATION_TYPES = ["local", "nhs_local", "emergency_service", "school_or_college"] +NON_CROWN_ORGANISATION_TYPES = ["local", "nhs_local", "emergency_service", "school_or_college", "nhs"] class OrganisationTypes(db.Model): diff --git a/migrations/versions/0299_org_types_table.py b/migrations/versions/0299_org_types_table.py index bc7df5cd7..47468b1a5 100644 --- a/migrations/versions/0299_org_types_table.py +++ b/migrations/versions/0299_org_types_table.py @@ -29,6 +29,7 @@ def upgrade(): {'name': x, 'is_crown': y, 'annual_free_sms_fragment_limit': z} for x, y, z in [ ["central", None, 250000], ["local", False, 25000], + ["nhs", None, 25000], ["nhs_central", True, 250000], ["nhs_local", False, 25000], ["emergency_service", False, 25000],