diff options
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r-- | archaeological_finds/models_finds.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index a5ff20773..53a1e3eef 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -3658,13 +3658,14 @@ class FindTreatment(models.Model): db_table = 'archaeological_finds_find_treatments' def location_type_label(self): - return LOCATION_TYPE_DICT[self.location_type] + if self.location_type in LOCATION_TYPE_DICT: + return LOCATION_TYPE_DICT[self.location_type] def generate_full_location(self): if getattr(self, "_full_location_set", False) or self.full_location or ( not self.treatment.is_current_container_changer and not self.treatment.is_reference_container_changer): - return + return False if self.treatment.is_current_container_changer: if self.treatment.is_reference_container_changer: self.location_type = "B" @@ -3678,6 +3679,7 @@ class FindTreatment(models.Model): self.full_location = self.container_ref.generate_full_location() self._full_location_set = True self.save() + return True class Property(LightHistorizedItem): |