mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 08:16:19 -04:00
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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user