check rancher unique national code in serilaizer validation
This commit is contained in:
7
apps/herd/exception.py
Normal file
7
apps/herd/exception.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from rest_framework.exceptions import APIException
|
||||
from rest_framework import status
|
||||
|
||||
|
||||
class UniqueRancherApiException(APIException):
|
||||
status_code = status.HTTP_403_FORBIDDEN
|
||||
default_detail = "دامدار با این کد ملی از قبل در سیستم وجود دارد" # noqa
|
||||
Reference in New Issue
Block a user