Use NHS.UK branding is for all NHS services

Anyone choosing ‘NHS’ for their organisation type gets should get the
NHS branding. We don’t want to hard-code an ID for NHS branding anywhere
because it won’t be consistent between environments.

So instead we can say that anyone who chooses ‘NHS’ as their
organisation type should get whatever branding has `nhs.uk` as its
domain.

This allows us to easily manage the branding the same way we do other
brands, but gives us the efficiency of having it auto applied.
This commit is contained in:
Chris Hill-Scott
2018-09-03 16:07:56 +01:00
parent 46dcaf3e54
commit 01fdcb8998
4 changed files with 16 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ def _add_invited_user_to_service(invited_user):
def _create_service(service_name, organisation_type, email_from, form):
free_sms_fragment_limit = current_app.config['DEFAULT_FREE_SMS_FRAGMENT_LIMITS'].get(organisation_type)
email_branding = email_branding_client.get_email_branding_id_for_domain(
'nhs.uk' if organisation_type == 'nhs' else
AgreementInfo.from_current_user().canonical_domain
)
try: