diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-03-30 10:42:06 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-03-30 10:42:06 +0200 |
commit | abedf10c0916c553c01938434056821068fd3a5b (patch) | |
tree | 0b543255297d0d3fed65b71e81194984441f81a4 /archaeological_operations | |
parent | ab72e9420b213c21e5f46a9fee06cf1795731317 (diff) | |
download | Ishtar-abedf10c0916c553c01938434056821068fd3a5b.tar.bz2 Ishtar-abedf10c0916c553c01938434056821068fd3a5b.zip |
Do not display default year
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/models.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 12a6aecf5..0e36570b6 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1212,8 +1212,11 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem, def public_representation(self): dct = super(Operation, self).public_representation() + year = self.year \ + if self.year and self.year != settings.ISHTAR_DEFAULT_YEAR \ + else None dct.update({ - "year": self.year if settings.ISHTAR_DEFAULT_YEAR else None, + "year": year, "common-name": self.common_name, "operation-type": self.operation_type and str(self.operation_type), "remains": [str(r) for r in self.remains.all()], |