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:
@@ -520,5 +520,7 @@ def format_billions(count):
|
||||
return humanize.intword(count)
|
||||
|
||||
|
||||
def format_yes_no(value):
|
||||
return 'Yes' if value else 'No'
|
||||
def format_yes_no(value, yes='Yes', no='No', none='No'):
|
||||
if value is None:
|
||||
return none
|
||||
return yes if value else no
|
||||
|
||||
Reference in New Issue
Block a user