mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
When updating org type to NHS type also update email branding if none set
This commit is contained in:
@@ -105,6 +105,12 @@ def create_organisation():
|
||||
def update_organisation(organisation_id):
|
||||
data = request.get_json()
|
||||
validate(data, post_update_organisation_schema)
|
||||
|
||||
organisation = dao_get_organisation_by_id(organisation_id)
|
||||
|
||||
if data.get('organisation_type') in NHS_ORGANISATION_TYPES and not organisation.email_branding_id:
|
||||
data["email_branding_id"] = current_app.config['NHS_EMAIL_BRANDING_ID']
|
||||
|
||||
result = dao_update_organisation(organisation_id, **data)
|
||||
|
||||
if data.get('agreement_signed') is True:
|
||||
|
||||
Reference in New Issue
Block a user