diff options
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r-- | archaeological_finds/models_finds.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 4bf6778fd..0d7ee8b71 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -3398,7 +3398,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 @@ -3412,14 +3412,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 @@ -3433,10 +3437,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 |