mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
nhs_central is crown org and also we do not update org type while
updating service anymore.
This commit is contained in:
@@ -106,9 +106,6 @@ def dao_add_service_to_organisation(service, organisation_id):
|
||||
db.session.add(service)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def dao_get_invited_organisation_user(user_id):
|
||||
return InvitedOrganisationUser.query.filter_by(id=user_id).one()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user