fix: 修复权限 view 没有 Model 的问题

pull/7958/head
ibuler 2022-03-22 12:51:24 +08:00 committed by 老广
parent 2ec0cb8a2c
commit 2721793b8f
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class RBACPermission(permissions.DjangoModelPermissions):
try:
queryset = self._queryset(view)
model_cls = queryset.model
except AssertionError:
except:
model_cls = None
return model_cls