mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 02:41:14 -05:00
Don't fallback to dvla_organisation if letter branding unset
The template preview app now accepts a null value for the `filename` parameter. If a service doesn't have a letter branding option set, previously we defaulted to their dvla_organisation (probably HM Government). Now, we pass through None, so that we generate letters without any logo or branding.
This commit is contained in:
@@ -265,9 +265,7 @@ def preview_letter_template_by_notification_id(service_id, notification_id, file
|
||||
}
|
||||
|
||||
service = dao_fetch_service_by_id(service_id)
|
||||
# We only need this while we are migrating to the new letter_branding model
|
||||
letter_logo_filename = service.letter_branding.filename if service.letter_branding \
|
||||
else service.dvla_organisation.filename
|
||||
letter_logo_filename = service.letter_branding and service.letter_branding.filename
|
||||
data = {
|
||||
'letter_contact_block': notification.reply_to_text,
|
||||
'template': template_for_letter_print,
|
||||
|
||||
Reference in New Issue
Block a user