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 10:45:09 +0200
commit5d1b3d348c97a128e4eeaae270b4a70cc1998f8b (patch)
treef2ca3db8f33ec0088add1918d22174fd7eb63ea9 /archaeological_finds
parentd52330d3f042bcd0aa2ad3c10288365922405d01 (diff)
downloadIshtar-5d1b3d348c97a128e4eeaae270b4a70cc1998f8b.tar.bz2
Ishtar-5d1b3d348c97a128e4eeaae270b4a70cc1998f8b.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 40381a6bb..ec50c6f06 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -3397,7 +3397,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
@@ -3411,14 +3411,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
@@ -3432,10 +3436,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