From e92230a0ef60578ba983a5d06a149842f1a0bba8 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Wed, 10 Oct 2018 16:28:06 +0100 Subject: [PATCH] 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. --- app/main/views/index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main/views/index.py b/app/main/views/index.py index 56c74b4bf..4bd91594f 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -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'