fix weight error in tarnsaction validation serializer
This commit is contained in:
@@ -182,7 +182,7 @@ class InventoryQuotaSaleTransactionSerializer(serializers.ModelSerializer):
|
||||
total=models.Sum('weight')
|
||||
)['total'] or 0
|
||||
|
||||
if total_sale_weight + attrs['weight'] > distribution.weight:
|
||||
if total_sale_weight + item.get('weight') > distribution.weight:
|
||||
raise DistributionWeightException()
|
||||
|
||||
return attrs
|
||||
|
||||
Reference in New Issue
Block a user