This commit is contained in:
@@ -147,6 +147,12 @@ class ServiceOrderSerializer(serializers.ModelSerializer):
|
||||
validated_data['salesperson'] = salesperson
|
||||
except Salesperson.DoesNotExist:
|
||||
pass
|
||||
|
||||
try:
|
||||
distributor = Distributor.objects.get(invite_code=ref_code)
|
||||
validated_data['distributor'] = distributor
|
||||
except Distributor.DoesNotExist:
|
||||
pass
|
||||
|
||||
return super().create(validated_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user