fix bug of ranvher nmional code key in transaction
This commit is contained in:
@@ -123,6 +123,7 @@ class InventoryQuotaSaleTransactionSerializer(serializers.ModelSerializer):
|
||||
items_data = self.context['request'].data['items']
|
||||
with atomic():
|
||||
# get rancher with national code
|
||||
if 'rancher_national_code' in validated_data.keys():
|
||||
rancher = Rancher.objects.get(national_code=validated_data.pop('rancher_national_code'))
|
||||
validated_data.update({'rancher': rancher})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user