summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-10-22 15:51:43 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-10-24 18:20:47 +0200
commit0ea8d08ef8fc8c998fea8c3ee42dc9bfd40fc4a7 (patch)
tree9df61bf56f925af4b2e72cbf6081e9e154bb3cd1 /archaeological_finds
parent71a5bf5cc8fa8061804061e3773ab135aae48474 (diff)
downloadIshtar-0ea8d08ef8fc8c998fea8c3ee42dc9bfd40fc4a7.tar.bz2
Ishtar-0ea8d08ef8fc8c998fea8c3ee42dc9bfd40fc4a7.zip
🐛 fix regenerate cached label of childs on container move (refs #6480)
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/models_finds.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 6104587c2..353d96faf 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -3600,7 +3600,7 @@ class Find(
set_static_localisation_9.post_save = True
- def update_current_full_location(self, full_location=None):
+ def update_current_full_location(self, full_location=None, return_value=False):
"""
If relevant update full location of current container
:param full_location: provided if update is triggered from container
@@ -3614,14 +3614,18 @@ class Find(
full_location = self.container.generate_full_location()
if full_location == self.container_fisrt_full_location:
return False
+ if return_value:
+ return full_location
self.container_fisrt_full_location = full_location
else:
if self.container_fisrt_full_location == "":
return False
+ if return_value:
+ return ""
self.container_fisrt_full_location = ""
return True
- def update_ref_full_location(self, full_location=None):
+ def update_ref_full_location(self, full_location=None, return_value=False):
"""
If relevant update full location of reference container
:param full_location: provided if update is triggered from container
@@ -3635,10 +3639,14 @@ class Find(
full_location = self.container_ref.generate_full_location()
if full_location == self.container_ref_fisrt_full_location:
return False
+ if return_value:
+ return full_location
self.container_ref_fisrt_full_location = full_location
else:
if self.container_ref_fisrt_full_location == "":
return False
+ if return_value:
+ return ""
self.container_ref_fisrt_full_location = ""
return True