Merge pull request #2110 from volundmush/fix_sync

Fix sync
This commit is contained in:
Griatch 2020-04-20 20:31:20 +02:00 committed by GitHub
commit 97a99db33f

View file

@ -101,7 +101,7 @@ class Session(object):
the keys given by self._attrs_to_sync.
"""
return {attr: getattr(self, attr, None) for attr in settings.SESSION_SYNC_ATTRS}
return {attr: getattr(self, attr) for attr in settings.SESSION_SYNC_ATTRS if hasattr(self, attr)}
def load_sync_data(self, sessdata):
"""