akdasa / gem

Application to improve GBC meeting experience
1 stars 1 forks source link

Fail to cache None object #78

Closed akdasa closed 6 years ago

akdasa commented 6 years ago
 return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/ubuntu/workspace/gem/web/blueprints/account/account.py", line 30, in login
    return LoginController().login()
  File "/home/ubuntu/workspace/gem/web/blueprints/account/controllers/login.py", line 21, in login
    {"$and": [{"password": password}, {"$or": [{"login": lgn}, {"name": lgn}]}]})
  File "/home/ubuntu/workspace/gem/db/core/repository.py", line 27, in find_one
    return self.__map(self.__find_one(criteria))
  File "/home/ubuntu/workspace/gem/db/core/repository.py", line 58, in __find_one
    self._cache.set(obj.id, obj)  # save object in cache
AttributeError: 'NoneType' object has no attribute 'id'
akdasa commented 6 years ago

Done