fix - if rancher duplicated in check with national code in pos

This commit is contained in:
2025-11-11 13:45:23 +03:30
parent a66b29e609
commit 816bbeeb4d
2 changed files with 19 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
from rest_framework.exceptions import APIException
from rest_framework import status
from rest_framework.exceptions import APIException
class UniqueRancherApiException(APIException):
@@ -7,6 +7,11 @@ class UniqueRancherApiException(APIException):
default_detail = "دامدار با این کد ملی از قبل در سیستم وجود دارد" # noqa
class DuplicateRancherException(APIException):
status_code = status.HTTP_403_FORBIDDEN
default_detail = "دامدار با این شماره تماس از قبل در سیستم وجود دارد" # noqa
class HerdCapacityException(APIException):
status_code = status.HTTP_403_FORBIDDEN
default_detail = "مقدار حجم سبک و سنگین وارد شده از ظرفیت گله بیشتر میباشد" # noqa