fix bug of inventory entry

This commit is contained in:
2025-08-10 08:38:27 +03:30
parent a8eda71e0f
commit ac1cd16de8

View File

@@ -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()