show_my_org in organizations list - validation of org national_unique_id

This commit is contained in:
2025-10-28 14:37:59 +03:30
parent da4909ab68
commit ee7f645ecd
5 changed files with 37 additions and 3 deletions

View File

@@ -19,6 +19,14 @@ class OrganizationBankAccountException(APIException):
default_code = "برای این سازمان حساب بانکی تعریف نشده است" # noqa
class OrganizationNationalUniqueIDException(APIException):
""" if organization unique id exist """
status_code = status.HTTP_403_FORBIDDEN
default_detail = _('این شناسه ملی قبلا ثبت شده است') # noqa
default_code = 'organization_unique_id_exist'
class UserExistException(APIException):
""" if user exist """
@@ -26,6 +34,7 @@ class UserExistException(APIException):
default_detail = _('کاربری با این شماره موبایل یا با این نام کاربری از قبل وجود دارد') # noqa
default_code = 'user_does_not_exist'
class AdminDeleteException(APIException):
""" admin user can not be deleted """