Fix attribute name to resolve recursion error in _recache method.

This commit is contained in:
Tehom 2017-04-20 14:14:00 -04:00
parent ae2c2be8a1
commit 7e8e47b3b3

View file

@ -59,7 +59,7 @@ class ObjectSessionHandler(object):
self._sessid_cache = list(set(int(val) for val in (self.obj.db_sessid or "").split(",") if val))
if any(sessid for sessid in self._sessid_cache if sessid not in _SESSIONS):
# cache is out of sync with sessionhandler! Only retain the ones in the handler.
self.sessid_cache = [sessid for sessid in self._sessid_cache if sessid in _SESSIONS]
self._sessid_cache = [sessid for sessid in self._sessid_cache if sessid in _SESSIONS]
self.obj.db_sessid = ",".join(str(val) for val in self._sessid_cache)
self.obj.save(update_fields=["db_sessid"])