diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-04 11:41:04 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-04 11:41:04 +0200 |
commit | f6058532b7644c586d28eeeaf8b9308320f9fe19 (patch) | |
tree | f1a7c228f27b186c68405b35f6359b581c1c9ada /archaeological_finds | |
parent | 3f18460f80c89d5de4420fbe53fb39991cd08105 (diff) | |
download | Ishtar-f6058532b7644c586d28eeeaf8b9308320f9fe19.tar.bz2 Ishtar-f6058532b7644c586d28eeeaf8b9308320f9fe19.zip |
Base finds: fix cache generation on context record change (refs #3484)
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/models_finds.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 1b492148a..68bc5269c 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -192,6 +192,7 @@ class BaseFind(BaseHistorizedItem, OwnPerms): help_text=_(u"Cached value - do not edit")) history = HistoricalRecords() RELATED_POST_PROCESS = ['find'] + CACHED_LABELS = ['cache_short_id', 'cache_complete_id'] class Meta: verbose_name = _(u"Base find") @@ -254,6 +255,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms): ).format(self.index)) return settings.JOINT.join(c_id) + def _generate_cache_complete_id(self): + return self.complete_id() + def short_id(self): # OPE|FIND_index c_id = [self._ope_code()] @@ -261,6 +265,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms): ).format(self.index)) return settings.JOINT.join(c_id) + def _generate_cache_short_id(self): + return self.short_id() + def full_label(self): return self._real_label() or self._temp_label() or u"" |