Remove govuk from possible brands

‘GOV.UK’ doesn’t make sense as a type of brand. It only made sense as
a type of branding that a service had.

Since we’ve:
- deprecated the service branding column
- made sure it’s not used as a value in the email branding table

we can remove this value from the table of possible brand types.
This commit is contained in:
Chris Hill-Scott
2018-08-30 16:22:59 +01:00
parent 337496c5bc
commit 0c47d41977
5 changed files with 35 additions and 23 deletions

View File

@@ -25,7 +25,6 @@ from app.models import (
KEY_TYPE_TEST,
BRANDING_BOTH,
BRANDING_ORG_BANNER,
BRANDING_GOVUK,
EMAIL_TYPE,
NOTIFICATION_CREATED,
NOTIFICATION_TECHNICAL_FAILURE,
@@ -190,10 +189,7 @@ def get_logo_url(base_url, logo_file):
def get_html_email_options(service):
if (
service.email_branding is None or
service.email_branding.brand_type == BRANDING_GOVUK
):
if service.email_branding is None:
return {
'govuk_banner': True,
'brand_banner': False,

View File

@@ -188,11 +188,11 @@ user_to_organisation = db.Table(
)
BRANDING_GOVUK = 'govuk'
BRANDING_GOVUK = 'govuk' # Deprecated outside migrations
BRANDING_ORG = 'org'
BRANDING_BOTH = 'both'
BRANDING_ORG_BANNER = 'org_banner'
BRANDING_TYPES = [BRANDING_GOVUK, BRANDING_ORG, BRANDING_BOTH, BRANDING_ORG_BANNER]
BRANDING_TYPES = [BRANDING_ORG, BRANDING_BOTH, BRANDING_ORG_BANNER]
class BrandingTypes(db.Model):
@@ -213,7 +213,7 @@ class EmailBranding(db.Model):
db.ForeignKey('branding_type.name'),
index=True,
nullable=True,
default=BRANDING_GOVUK
default=BRANDING_ORG
)
def serialize(self):