filter all apis of organization city & province - cant remove own user or organoization
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from rest_framework.exceptions import APIException
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from rest_framework import status
|
||||
from rest_framework.exceptions import APIException
|
||||
|
||||
|
||||
class TokenBlackListedException(APIException):
|
||||
@@ -17,3 +17,11 @@ class OrganizationBankAccountException(APIException):
|
||||
status_code = status.HTTP_403_FORBIDDEN
|
||||
default_detail = "برای این سازمان حساب بانکی تعریف نشده است, ابتدا حساب بانکی تعریف کنید" # noqa
|
||||
default_code = "برای این سازمان حساب بانکی تعریف نشده است" # noqa
|
||||
|
||||
|
||||
class UserExistException(APIException):
|
||||
""" if user exist """
|
||||
|
||||
status_code = status.HTTP_403_FORBIDDEN
|
||||
default_detail = _('کاربری با این شماره موبایل یا با این نام کاربری از قبل وجود دارد') # noqa
|
||||
default_code = 'user_does_not_exist'
|
||||
|
||||
Reference in New Issue
Block a user