From ac1cd16de8d9bb0277e9c5b01af29a661d8cc34f Mon Sep 17 00:00:00 2001 From: Mojtaba-z Date: Sun, 10 Aug 2025 08:38:27 +0330 Subject: [PATCH] fix bug of inventory entry --- apps/warehouse/web/api/v1/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/warehouse/web/api/v1/serializers.py b/apps/warehouse/web/api/v1/serializers.py index b822468..9d3ec52 100644 --- a/apps/warehouse/web/api/v1/serializers.py +++ b/apps/warehouse/web/api/v1/serializers.py @@ -52,7 +52,7 @@ class InventoryEntrySerializer(serializers.ModelSerializer): raise InventoryEntryWeightException() # if instance is not exists for create, check entry weight with distribution - elif not self.instance: + else: if total_entered + attrs['weight'] > distribution.weight: raise InventoryEntryWeightException()