并且使用不存在的用户名登录时总是报错:
if not force and not user.is_active():
AttributeError: 'NoneType' object has no attribute 'is_active'
def is_active(self):
return True
代码就是参考flask-admin的auth例子写的。
并且使用不存在的用户名登录时总是报错:
if not force and not user.is_active():
AttributeError: 'NoneType' object has no attribute 'is_active'
def is_active(self):
return True
代码就是参考flask-admin的auth例子写的。