mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
When creating a new NHS org, set default email branding to NHS
This is more appropriate default for that org than gov.uk branding and will help us with our work to make setting the branding more self-service.
This commit is contained in:
@@ -22,7 +22,7 @@ from app.dao.services_dao import dao_fetch_service_by_id
|
||||
from app.dao.templates_dao import dao_get_template_by_id
|
||||
from app.dao.users_dao import get_user_by_id
|
||||
from app.errors import InvalidRequest, register_errors
|
||||
from app.models import KEY_TYPE_NORMAL, Organisation
|
||||
from app.models import KEY_TYPE_NORMAL, NHS_ORGANISATION_TYPES, Organisation
|
||||
from app.notifications.process_notifications import (
|
||||
persist_notification,
|
||||
send_notification_to_queue,
|
||||
@@ -93,6 +93,9 @@ def create_organisation():
|
||||
|
||||
validate(data, post_create_organisation_schema)
|
||||
|
||||
if data["organisation_type"] in NHS_ORGANISATION_TYPES:
|
||||
data["email_branding_id"] = current_app.config['NHS_EMAIL_BRANDING_ID']
|
||||
|
||||
organisation = Organisation(**data)
|
||||
dao_create_organisation(organisation)
|
||||
return jsonify(organisation.serialize()), 201
|
||||
|
||||
Reference in New Issue
Block a user