wherehouse: fix stock movemend create serializer

This commit is contained in:
behruz-dev
2025-11-01 15:15:11 +05:00
parent 07a5489771
commit b3845d8d74

View File

@@ -55,7 +55,7 @@ class StockMovmendCreateSerializer(serializers.Serializer):
).first() ).first()
if not wherehouse_from: if not wherehouse_from:
raise serializers.ValidationError("WhereHouse from not found") raise serializers.ValidationError("WhereHouse from not found")
if data.get('recipient'): if data.get('recipient_id'):
recipient = User.objects.filter(id=data.get('recipient_id')).first() recipient = User.objects.filter(id=data.get('recipient_id')).first()
if not recipient: if not recipient:
raise serializers.ValidationError("Recipient not found") raise serializers.ValidationError("Recipient not found")