diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-06-18 19:18:36 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-06-18 19:18:36 +0200 |
| commit | 400af83b8cb210fff40ee0e566c88fd54c07bc53 (patch) | |
| tree | 4cc59d13a5a7c3cab007b9c9960c889e32eb3a8d | |
| parent | 336b41759e71b5cf936aa640c2d98f1b4031d3e3 (diff) | |
| download | Ishtar-400af83b8cb210fff40ee0e566c88fd54c07bc53.tar.bz2 Ishtar-400af83b8cb210fff40ee0e566c88fd54c07bc53.zip | |
🐛 fix full location save on packaging with no containers (should not occur but...)
| -rw-r--r-- | archaeological_finds/models_finds.py | 4 |
1 files 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 |
