summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-06-02 13:18:25 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:21 +0100
commitfa90d96f807d56d87ccfbb3141e70a7603ca5b60 (patch)
tree22f26730c66de9d357f3ceb2f343d6d0cab53b91 /ishtar_common/models.py
parent916311c130b2a736374444894e232df605fd7d19 (diff)
downloadIshtar-fa90d96f807d56d87ccfbb3141e70a7603ca5b60.tar.bz2
Ishtar-fa90d96f807d56d87ccfbb3141e70a7603ca5b60.zip
Documents form: new fields
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index b3a19c42f..58385c1dc 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -4477,6 +4477,18 @@ def get_responsible_planning_service_label():
return _("Error: responsible_planning_service type is missing")
+def get_publisher_label():
+ if apps.ready:
+ lbls = []
+ for key in settings.ISHTAR_SLUGS["document-editor"]:
+ lbl = get_general_type_label(OrganizationType, key)
+ if lbl:
+ lbls.append(lbl)
+ if lbls:
+ return " ; ".join(lbls)
+ return _("Error: publisher type is missing")
+
+
class TitleType(GeneralType):
class Meta:
verbose_name = _("Title type")