Files
RasadDam_Backend/apps/authorization/exception.py

9 lines
313 B
Python
Raw Normal View History

2025-10-28 13:51:05 +03:30
from rest_framework import status
from rest_framework.exceptions import APIException
class AdminRoleDeleteException(APIException):
status_code = status.HTTP_403_FORBIDDEN
default_detail = 'نقش ادمین قابلیت حذف شدن ندارد' # noqa
default_code = 'admin_role_delete_exception'