summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-27 17:31:00 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-27 17:31:00 +0100
commit466398d76996c5219491807e28709ec17706e8d3 (patch)
treedc2627a86507fe03bf42b21bcc5fe21183573cf4 /archaeological_warehouse/models.py
parentfe841330a8811a6a5b828c93520aae2727661dcb (diff)
downloadIshtar-466398d76996c5219491807e28709ec17706e8d3.tar.bz2
Ishtar-466398d76996c5219491807e28709ec17706e8d3.zip
Add custom cached_label configuration for each main item
Diffstat (limited to 'archaeological_warehouse/models.py')
-rw-r--r--archaeological_warehouse/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py
index 4fcb1b1d7..224fe8b21 100644
--- a/archaeological_warehouse/models.py
+++ b/archaeological_warehouse/models.py
@@ -1123,9 +1123,6 @@ class Container(
)
reference = models.TextField(_("Container ref."))
comment = models.TextField(_("Comment"), blank=True, default="")
- cached_label = models.TextField(
- _("Localisation"), blank=True, default="", db_index=True
- )
cached_location = models.TextField(
_("Cached location"), blank=True, default="", db_index=True
)
@@ -1309,6 +1306,9 @@ class Container(
context.pop(k)
def _generate_cached_label(self):
+ label = self._profile_generate_cached_label()
+ if label:
+ return label
return self.precise_location
def _generate_cached_location(self):