mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Move unknown organisation logic into Jinja
Human readable content like this doesn’t really belong in the model layer, it’s more natural to have it in the presentation layer.
This commit is contained in:
@@ -101,21 +101,6 @@ class Organisation(JSONModel):
|
||||
self.request_to_go_live_notes = None
|
||||
self.email_branding_id = None
|
||||
|
||||
@property
|
||||
def as_agreement_statement_for_go_live_request(self):
|
||||
return '{} (organisation is {}, {}).'.format(
|
||||
{
|
||||
False: 'No',
|
||||
None: 'Can’t tell',
|
||||
}.get(self.agreement_signed),
|
||||
self.name,
|
||||
{
|
||||
True: 'a crown body',
|
||||
False: 'a non-crown body',
|
||||
None: 'crown status unknown',
|
||||
}.get(self.crown),
|
||||
)
|
||||
|
||||
def as_info_for_branding_request(self, fallback_domain):
|
||||
return self.name or 'Can’t tell (domain is {})'.format(fallback_domain)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user