mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-02 17:48:36 -04:00
Fix automatic inheritance of org’s branding
When creating a service it should inherit it’s organisation’s branding, if that organisation has branding. This wasn’t working because we were referring to the ID of the branding when making the association, not the branding itself.
This commit is contained in:
@@ -194,11 +194,11 @@ def dao_create_service(
|
||||
|
||||
service.organisation = organisation
|
||||
|
||||
if organisation.email_branding_id:
|
||||
service.email_branding = organisation.email_branding_id
|
||||
if organisation.email_branding:
|
||||
service.email_branding = organisation.email_branding
|
||||
|
||||
if organisation.letter_branding_id and not service.letter_branding:
|
||||
service.letter_branding = organisation.letter_branding_id
|
||||
if organisation.letter_branding and not service.letter_branding:
|
||||
service.letter_branding = organisation.letter_branding
|
||||
|
||||
db.session.add(service)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user