Use nhs_gp not gp as org type

Means we have the option of looking for anything starting with `nhs` as
a way of filtering organisations.
This commit is contained in:
Chris Hill-Scott
2019-08-28 15:21:59 +01:00
parent a5b36457f2
commit edb5790b7c
3 changed files with 4 additions and 4 deletions

View File

@@ -326,11 +326,11 @@ class Domain(db.Model):
ORGANISATION_TYPES = [
"central", "local", "nhs_central", "nhs_local", "gp", "emergency_service", "school_or_college", "other",
"central", "local", "nhs_central", "nhs_local", "nhs_gp", "emergency_service", "school_or_college", "other",
]
CROWN_ORGANISATION_TYPES = ["nhs_central"]
NON_CROWN_ORGANISATION_TYPES = ["local", "nhs_local", "gp", "emergency_service", "school_or_college"]
NON_CROWN_ORGANISATION_TYPES = ["local", "nhs_local", "nhs_gp", "emergency_service", "school_or_college"]
class OrganisationTypes(db.Model):

View File

@@ -12,7 +12,7 @@ from alembic import op
revision = '0305_add_gp_org_type'
down_revision = '0304_remove_org_to_service'
GP_ORG_TYPE_NAME = 'gp'
GP_ORG_TYPE_NAME = 'nhs_gp'
def upgrade():

View File

@@ -206,7 +206,7 @@ def test_post_create_organisation_existing_name_raises_400(admin_request, sample
'organisation_type': 'foo',
}, (
'organisation_type foo is not one of '
'[central, local, nhs_central, nhs_local, gp, emergency_service, school_or_college, other]'
'[central, local, nhs_central, nhs_local, nhs_gp, emergency_service, school_or_college, other]'
)),
))
def test_post_create_organisation_with_missing_data_gives_validation_error(