mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Add org types table
This commit is contained in:
@@ -86,7 +86,8 @@ from app.errors import (
|
||||
)
|
||||
from app.letters.utils import letter_print_day
|
||||
from app.models import (
|
||||
KEY_TYPE_NORMAL, LETTER_TYPE, NOTIFICATION_CANCELLED, Permission, Service, EmailBranding, LetterBranding
|
||||
KEY_TYPE_NORMAL, LETTER_TYPE, NON_CROWN_ORGANISATION_TYPES, NOTIFICATION_CANCELLED, Permission, Service,
|
||||
EmailBranding, LetterBranding
|
||||
)
|
||||
from app.notifications.process_notifications import persist_notification, send_notification_to_queue
|
||||
from app.schema_validation import validate
|
||||
@@ -224,8 +225,8 @@ def update_service(service_id):
|
||||
|
||||
service = service_schema.load(current_data).data
|
||||
org_type = req_json.get('organisation_type', None)
|
||||
if org_type:
|
||||
service.crown = org_type == 'central'
|
||||
if org_type and service.organisation_type in (NON_CROWN_ORGANISATION_TYPES + ["nhs"]):
|
||||
service.crown = False
|
||||
|
||||
if 'email_branding' in req_json:
|
||||
email_branding_id = req_json['email_branding']
|
||||
|
||||
Reference in New Issue
Block a user