小程序分销
All checks were successful
Deploy to Server / deploy (push) Successful in 24s

This commit is contained in:
jeremygan2021
2026-02-17 11:14:58 +08:00
parent 321c57bee2
commit ac61a127ae
15 changed files with 464 additions and 21 deletions

View File

@@ -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)