summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-11-25 03:23:05 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-11-25 03:23:05 +0100
commitd5e26abe38f95f773f139a7d13a1ad51c241b4ad (patch)
tree77e2c6521e3d989b761ace89b25d2a393f5d761c
parentab52e389c0849fc26f5b20bf64978679ced1fc8b (diff)
downloadIshtar-d5e26abe38f95f773f139a7d13a1ad51c241b4ad.tar.bz2
Ishtar-d5e26abe38f95f773f139a7d13a1ad51c241b4ad.zip
Finds: force regeneration of cached index values
-rw-r--r--archaeological_finds/models.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py
index 3cfa4b5e2..0006c29a7 100644
--- a/archaeological_finds/models.py
+++ b/archaeological_finds/models.py
@@ -484,11 +484,15 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):
modified = True
base_find.index = BaseFind.get_max_index(
base_find.context_record.operation) + 1
- if not base_find.cache_short_id:
+ if not base_find.cache_short_id or \
+ not base_find.cache_short_id.endswith(
+ unicode(base_find.index)):
base_find.cache_short_id = base_find.short_id()
if base_find.cache_short_id:
modified = True
- if not base_find.cache_complete_id:
+ if not base_find.cache_complete_id or \
+ not base_find.cache_complete_id.endswith(
+ unicode(base_find.index)):
base_find.cache_complete_id = base_find.complete_id()
if base_find.cache_complete_id:
modified = True