fix: 修复logger.error堆栈问题

pull/9651/head
Bai 2 years ago committed by Jiangjie.Bai
parent d246b9bb35
commit 8ab01931fb

@ -97,10 +97,10 @@ class RBACPermission(permissions.DjangoModelPermissions):
else:
model_cls = queryset.model
except AssertionError as e:
logger.error('Error get model cls: ', e)
logger.error(f'Error get model cls: {e}')
model_cls = None
except AttributeError as e:
logger.error('Error get model cls: ', e)
logger.error(f'Error get model cls: {e}')
model_cls = None
except Exception as e:
logger.error('Error get model class: {} of {}'.format(e, view))

Loading…
Cancel
Save