From 400af83b8cb210fff40ee0e566c88fd54c07bc53 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 18 Jun 2025 19:18:36 +0200 Subject: 🐛 fix full location save on packaging with no containers (should not occur but...) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_finds/models_finds.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index ffe397948..d6280d53e 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -3710,8 +3710,8 @@ class FindTreatment(models.Model): self.location_type = "R" if self.treatment.container: self.full_location = self.treatment.container.generate_full_location() - elif self.treatment.is_loan: - self.full_location = self.container_ref.generate_full_location() + elif self.treatment.is_loan and self.find.container_ref: + self.full_location = self.find.container_ref.generate_full_location() self._full_location_set = True self.save() return True -- cgit v1.2.3