diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-05-11 11:03:09 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-05-11 11:03:09 +0200 |
commit | af36826678104f6a5cc1bffe66510ab32ad10160 (patch) | |
tree | 4ab2d308b84d2e4162cb4c3b6ee26d799dbf3358 | |
parent | cf41a9523e54b7db5345345ad11375086bc7ccb5 (diff) | |
download | Ishtar-af36826678104f6a5cc1bffe66510ab32ad10160.tar.bz2 Ishtar-af36826678104f6a5cc1bffe66510ab32ad10160.zip |
🐛 Container import: do not crash on empty container type
-rw-r--r-- | archaeological_warehouse/models.py | 2 | ||||
-rw-r--r-- | changelog/en/changelog_2022-06-15.md | 1 | ||||
-rw-r--r-- | changelog/fr/changelog_2023-01-25.md | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index a59371776..048f02d4d 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -1900,7 +1900,7 @@ class Container( self.responsibility = self.location except Warehouse.DoesNotExist: return - if self.container_type.stationary: + if not hasattr(self, "container_type") or self.container_type.stationary: return q = Container.objects.filter(index=self.index, location=self.location) if self.id: diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md index 3c29d3a36..687b9b942 100644 --- a/changelog/en/changelog_2022-06-15.md +++ b/changelog/en/changelog_2022-06-15.md @@ -11,6 +11,7 @@ v4.0.45 - 2023- ### Technical ### - Migration font-awesome -> fork-awesome - Inline JS migrated to a dynamic, cacheable settings.js +- Container import: do not crash on empty container type v4.0.44 - 2023-04-17 -------------------- diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md index 86a2caa87..3a87bab31 100644 --- a/changelog/fr/changelog_2023-01-25.md +++ b/changelog/fr/changelog_2023-01-25.md @@ -11,6 +11,7 @@ v4.0.45 - 2023- ### Technique ### - Migration de la bibliothèque font-awesome -> fork-awesome - JS inline migré vers un settings.js dynamique pouvant être mis en cache +- Import contenants : éviter le crash si le type de contenant est vide v4.0.44 - 2023-04-17 |