提交 3ac20d80 编写于 作者: X xinwen 提交者: Jiangjie.Bai

fix: 登录日志的登录方式不准确

上级 3e38e4fc
......@@ -125,7 +125,8 @@ def on_audits_log_create(sender, instance=None, **kwargs):
def get_login_backend(request):
backend = request.session.get(BACKEND_SESSION_KEY, '')
backend = request.session.get('auth_backend', '') or request.session.get(BACKEND_SESSION_KEY, '')
backend = backend.rsplit('.', maxsplit=1)[-1]
if backend in LOGIN_BACKEND:
return LOGIN_BACKEND[backend]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册