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:
Chris Hill-Scott
2021-10-11 15:24:55 +01:00
parent eefc903b25
commit 72742cf477
3 changed files with 5 additions and 18 deletions

View File

@@ -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: 'Cant 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 'Cant tell (domain is {})'.format(fallback_domain)