fix bug of inventory entry
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user