fix - cant delete admin role

This commit is contained in:
2025-10-28 13:51:05 +03:30
parent a333a5e5a8
commit 7ffaff2c11
4 changed files with 24 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
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'