From 3f1de491d60943b8d8f82088febe2af89a8801de Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 8 Aug 2023 12:20:07 +0200 Subject: ⚡️ optimise post-treatments: prevent unnecessary cascade update (refs #5617) 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/models.py') diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 392082ba9..82b1e7e4b 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -1357,7 +1357,6 @@ class Container( return True return False - def _calculate_weight(self) -> bool: """ Calculate the weight of the contained finds + tare weight of the @@ -1970,6 +1969,7 @@ class Container( parent = Container.objects.filter(pk=parent).values_list("parent_id")[0][0] if number > self.location.max_division_number: self.location.max_division_number = number + self.location.no_post_process() self.location.save() def post_delete_to_update(self): -- cgit v1.2.3