filter all apis of organization city & province - cant remove own user or organoization

This commit is contained in:
2025-10-27 11:21:29 +03:30
parent 96cbd5a475
commit f567110286
9 changed files with 172 additions and 95 deletions

View File

@@ -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'