Allow coloured branding without logo in preview

Coloured brandings can just be a coloured
background with text. At the moment the /_email
preview page assumes a logo image will be part of
a brand so looks broken.
This commit is contained in:
Tom Byers
2018-10-10 16:28:06 +01:00
parent 2bd5ec6ec3
commit e92230a0ef

View File

@@ -108,7 +108,8 @@ def email_template():
colour = email_branding['colour']
brand_name = email_branding['text']
brand_colour = colour
brand_logo = 'https://{}/{}'.format(get_cdn_domain(), email_branding['logo'])
brand_logo = ('https://{}/{}'.format(get_cdn_domain(), email_branding['logo'])
if email_branding['logo'] else None)
govuk_banner = branding_type in ['govuk', 'both']
brand_banner = branding_type == 'org_banner'