diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-03-17 10:32:00 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-03-17 10:32:00 +0100 |
commit | 56c07db3047ac98e0b7ac54aa663f9acdad89fdb (patch) | |
tree | a391abd2c7c3b7b3883cdba37effab12cd9936ee | |
parent | 1c772426ed487e1deffdfff428fe84ac3b09ef13 (diff) | |
download | Ishtar-56c07db3047ac98e0b7ac54aa663f9acdad89fdb.tar.bz2 Ishtar-56c07db3047ac98e0b7ac54aa663f9acdad89fdb.zip |
Fix complete_id for base find
-rw-r--r-- | archaeological_finds/models_finds.py | 1 | ||||
-rw-r--r-- | ishtar_common/models_common.py | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 066bdb239..152e572f9 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -341,6 +341,7 @@ class BaseFind(BulkUpdatedItem, BaseHistorizedItem, GeoItem, history = HistoricalRecords() RELATED_POST_PROCESS = ['find'] CACHED_LABELS = ['cache_short_id', 'cache_complete_id'] + CACHED_COMPLETE_ID = "cache_complete_id" PARENT_SEARCH_VECTORS = ['context_record'] BASE_SEARCH_VECTORS = [ SearchVectorConfig("label"), diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index 0d7a5a686..e5bafdcd5 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -2801,6 +2801,8 @@ class CompleteIdentifierItem(models.Model, ImageContainerModel): cached_label_key = 'cached_label' if getattr(self, 'GEO_LABEL', None): cached_label_key = getattr(self, 'GEO_LABEL', None) + if hasattr(self, "CACHED_COMPLETE_ID"): + cached_label_key = self.CACHED_COMPLETE_ID complete_identifier = getattr(self, cached_label_key) return complete_identifier |