mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
create, edit and use email branding instead of organisation
notable things that have been kept until migration is complete: * passing in `organisation` to update_service will update email branding * both `/email-branding` and `/organisation` hit the same code * service endpoints still return organisation as well as email branding
This commit is contained in:
@@ -184,10 +184,15 @@ def update_service(service_id):
|
||||
if org_type:
|
||||
service.crown = org_type == 'central'
|
||||
|
||||
# TODO: remove this block after admin is updated to refer to email branding
|
||||
if 'organisation' in req_json:
|
||||
org_id = req_json['organisation']
|
||||
service.email_branding = None if not org_id else EmailBranding.query.get(org_id)
|
||||
|
||||
if 'email_branding' in req_json:
|
||||
email_branding_id = req_json['email_branding']
|
||||
service.email_branding = None if not email_branding_id else EmailBranding.query.get(email_branding_id)
|
||||
|
||||
dao_update_service(service)
|
||||
|
||||
if service_going_live:
|
||||
|
||||
Reference in New Issue
Block a user