In our code for checking online users, we remove values from connections in two steps: first we set all stale data to None and then we remove all None values. It seems this has a problem that if user object is accessed just in between this two steps, MongoEngine throws an error: connections - 'NoneType' object has no attribute 'get. Connections object is something like this:
In our code for checking online users, we remove values from connections in two steps: first we set all stale data to
None
and then we remove allNone
values. It seems this has a problem that if user object is accessed just in between this two steps, MongoEngine throws an error:connections - 'NoneType' object has no attribute 'get
. Connections object is something like this:It fails at line 979,
mongoengine/mongoengine/base.py
in_from_son
.