diff options
| -rw-r--r-- | archaeological_context_records/models.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/models.py | 2 | ||||
| -rw-r--r-- | example_project/settings.py | 1 | 
3 files changed, 4 insertions, 1 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 02b074706..4b25366f0 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -88,6 +88,8 @@ class Dating(models.Model):          verbose_name_plural = _("Datings")      def __str__(self): +        if self.precise_dating and self.precise_dating.strip(): +            return self.precise_dating.strip()          start_date = self.start_date and str(self.start_date) or ""          end_date = self.end_date and str(self.end_date) or ""          if not start_date and not end_date: diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 8a415c0c5..12a6aecf5 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1213,7 +1213,7 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem,      def public_representation(self):          dct = super(Operation, self).public_representation()          dct.update({ -            "year": self.year, +            "year": self.year if settings.ISHTAR_DEFAULT_YEAR else None,              "common-name": self.common_name,              "operation-type": self.operation_type and str(self.operation_type),              "remains": [str(r) for r in self.remains.all()], diff --git a/example_project/settings.py b/example_project/settings.py index 24c3bee35..ae795d04a 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -253,6 +253,7 @@ LIBREOFFICE_HOST = "localhost"  ISHTAR_MAP_MAX_ITEMS = 50000  ISHTAR_QRCODE_VERSION = 6  # density of the QR code  ISHTAR_QRCODE_SCALE = 2  # scale of the QR code +ISHTAR_DEFAULT_YEAR = 1900  ISHTAR_FILE_PREFIX = ""  | 
