show_my_org in organizations list - validation of org national_unique_id
This commit is contained in:
@@ -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 """
|
||||
|
||||
|
||||
Reference in New Issue
Block a user