Removing platform_default as a concept. No service actually wants to send letters with the default hm-government logo so we are going to remove it as a constraint.

However, until we can create a letter without a logo, we will still default to hm-government, because the dvla_organisation is set on the service.
This does simplify the code.
Also removed the inserts to letter_branding in the data migration file, because we can deploy this before the rest of the work is finished. But we will need to do it later.
This commit is contained in:
Rebecca Law
2019-01-25 15:03:01 +00:00
parent 7ee1d67df7
commit e030c2be88
11 changed files with 65 additions and 85 deletions

View File

@@ -3,17 +3,10 @@ from app.dao.dao_utils import transactional
from app.models import LetterBranding
def dao_get_letter_branding_or_platform_default(domain=None):
letter_branding = None
if domain:
letter_branding = LetterBranding.query.filter(
LetterBranding.domain == domain
).first()
if not letter_branding:
letter_branding = LetterBranding.query.filter(
LetterBranding.platform_default == True # noqa
).first()
return letter_branding
def dao_get_letter_branding_by_domain(domain):
return LetterBranding.query.filter(
LetterBranding.domain == domain
).first()
def dao_get_all_letter_branding():