mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 23:08:07 -04:00
use new letter branding instead of dvla organisation id
new code is copied stylistically from the email branding patterns. Instead of `service.dvla_organisation`, there's now `service.letter_branding` and `service.letter_branding_id`. However, unlike email branding we're not currently showing a preview of the logo. That can come later when we work out how we want to do it.
This commit is contained in:
@@ -28,6 +28,7 @@ class Service():
|
||||
'email_from',
|
||||
'id',
|
||||
'inbound_api',
|
||||
'letter_branding',
|
||||
'letter_contact_block',
|
||||
'letter_logo_filename',
|
||||
'message_limit',
|
||||
@@ -303,11 +304,15 @@ class Service():
|
||||
return email_branding_client.get_email_branding(self.email_branding_id)['email_branding']
|
||||
return None
|
||||
|
||||
@property
|
||||
def letter_branding_id(self):
|
||||
return self._dict['letter_branding']
|
||||
|
||||
@cached_property
|
||||
def letter_branding(self):
|
||||
return letter_branding_client.get_letter_branding().get(
|
||||
self.dvla_organisation, '001'
|
||||
)
|
||||
if self.letter_branding_id:
|
||||
return letter_branding_client.get_letter_branding(self.letter_branding_id)
|
||||
return None
|
||||
|
||||
@cached_property
|
||||
def organisation_name(self):
|
||||
|
||||
Reference in New Issue
Block a user