edit assignment
This commit is contained in:
@@ -13,7 +13,7 @@ class POSClientSerializer(ModelSerializer):
|
||||
org = attrs['organization']
|
||||
|
||||
# check for duplicate organization client
|
||||
if org:
|
||||
if not self.instance and org:
|
||||
if self.Meta.model.objects.filter(organization=org).exists():
|
||||
raise APIException("قبلا کلاینت با این سازمان ثبت شده است", code=status.HTTP_403_FORBIDDEN) # noqa
|
||||
|
||||
|
||||
Reference in New Issue
Block a user