From af36826678104f6a5cc1bffe66510ab32ad10160 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 11 May 2023 11:03:09 +0200 Subject: 🐛 Container import: do not crash on empty container type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_warehouse/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archaeological_warehouse') 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: -- cgit v1.2.3