fix: 修改显示 model 的错误

pull/9221/head
ibuler 2 years ago
parent 758453ae96
commit c040564dc2

@ -93,8 +93,10 @@ class RBACPermission(permissions.DjangoModelPermissions):
try:
queryset = self._queryset(view)
model_cls = queryset.model
except AssertionError:
model_cls = None
except Exception as e:
logger.error(e)
logger.error('Error get model class: {} of {}'.format(e, view))
model_cls = None
return model_cls

Loading…
Cancel
Save