fix: 修复 debug 日志信息

pull/6838/head
Bai 2021-09-14 00:03:17 +08:00 committed by Jiangjie.Bai
parent 8ac7d4b682
commit ced9e53d62
1 changed files with 2 additions and 2 deletions

View File

@ -105,13 +105,13 @@ class Setting(models.Model):
# 添加
if setting.cleaned_value and not has:
logger.debug('Add auth backend: ', name)
logger.debug('Add auth backend: {}'.format(name))
settings.AUTHENTICATION_BACKENDS.insert(0, backend)
# 去掉
if not setting.cleaned_value and has:
index = auth_backends.index(backend)
logger.debug('Pop auth backend: ', name)
logger.debug('Pop auth backend: {}'.format(name))
auth_backends.pop(index)
# 设置内存值