mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 05:13:12 -04:00
notify-api-412 use black to enforce python coding style
This commit is contained in:
@@ -2,19 +2,22 @@ from app.models.organization import Organization
|
||||
|
||||
|
||||
def get_email_choices(service):
|
||||
organization_branding_id = service.organization.email_branding_id if service.organization else None
|
||||
organization_branding_id = (
|
||||
service.organization.email_branding_id if service.organization else None
|
||||
)
|
||||
|
||||
if (
|
||||
service.organization_type == Organization.TYPE_FEDERAL
|
||||
and service.email_branding_id is not None # GOV.UK is not current branding
|
||||
and organization_branding_id is None # no default to supersede it (GOV.UK)
|
||||
):
|
||||
yield ('govuk', 'GOV.UK')
|
||||
yield ("govuk", "GOV.UK")
|
||||
|
||||
if (
|
||||
service.organization_type == Organization.TYPE_FEDERAL
|
||||
and service.organization
|
||||
and organization_branding_id is None # don't offer both if org has default
|
||||
and service.email_branding_name.lower() != f'GOV.UK and {service.organization.name}'.lower()
|
||||
and service.email_branding_name.lower()
|
||||
!= f"GOV.UK and {service.organization.name}".lower()
|
||||
):
|
||||
yield ('govuk_and_org', f'GOV.UK and {service.organization.name}')
|
||||
yield ("govuk_and_org", f"GOV.UK and {service.organization.name}")
|
||||
|
||||
Reference in New Issue
Block a user