fix - cant delete admin role
This commit is contained in:
8
apps/authorization/exception.py
Normal file
8
apps/authorization/exception.py
Normal 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'
|
||||
Reference in New Issue
Block a user