nhs_central is crown org and also we do not update org type while

updating service anymore.
This commit is contained in:
Pea Tyczynska
2019-07-16 14:56:04 +01:00
parent e4cb56b5d3
commit d89ef0594f
7 changed files with 10 additions and 36 deletions

View File

@@ -38,6 +38,7 @@ from app.models import (
TemplateRedacted,
User,
VerifyCode,
CROWN_ORGANISATION_TYPES,
EMAIL_TYPE,
INTERNATIONAL_SMS_TYPE,
KEY_TYPE_TEST,
@@ -285,6 +286,8 @@ def dao_create_service(
service.research_mode = False
if organisation:
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']):
service.crown = False
service.count_as_live = not user.platform_admin