浏览代码

[core] switch to checking for is_first_login_ever existance

This is more stable and enables other backends to use it.
It also fixes the tests.
Abraham Elmahrek 11 年之前
父节点
当前提交
1470f93
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/auth/views.py

+ 1 - 1
desktop/core/src/desktop/auth/views.py

@@ -70,7 +70,7 @@ def get_current_users():
 def first_login_ever():
 def first_login_ever():
   backends = get_backends()
   backends = get_backends()
   for backend in backends:
   for backend in backends:
-    if isinstance(backend, AllowFirstUserDjangoBackend) and backend.is_first_login_ever():
+    if hasattr(backend, 'is_first_login_ever') and backend.is_first_login_ever():
       return True
       return True
   return False
   return False