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

pull/7957/head
ibuler 2022-03-22 12:51:24 +08:00 committed by Jiangjie.Bai
parent ddbcbb0d66
commit 6f762d7198
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