summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py1
-rw-r--r--ishtar_common/models_common.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 180acd626..56c65c1f3 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -2971,6 +2971,7 @@ class Document(BaseHistorizedItem, CompleteIdentifierItem, OwnPerms, ImageModel,
}
CACHED_LABELS = ['cache_related_label']
+ CACHED_COMPLETE_ID = ""
EXTRA_REQUEST_KEYS = {
"operations": "operations__pk",
"context_records": "context_records__pk",
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py
index e5bafdcd5..e0685c064 100644
--- a/ishtar_common/models_common.py
+++ b/ishtar_common/models_common.py
@@ -2803,6 +2803,8 @@ class CompleteIdentifierItem(models.Model, ImageContainerModel):
cached_label_key = getattr(self, 'GEO_LABEL', None)
if hasattr(self, "CACHED_COMPLETE_ID"):
cached_label_key = self.CACHED_COMPLETE_ID
+ if not cached_label_key:
+ return
complete_identifier = getattr(self, cached_label_key)
return complete_identifier