Fix session failing to load if no auth_key present

This commit is contained in:
Lonami Exo 2017-09-29 19:54:40 +02:00
parent 56103845de
commit 6df38da793

View File

@ -118,7 +118,7 @@ class Session:
# FIXME We need to import the AuthKey here or otherwise
# we get cyclic dependencies.
from ..crypto import AuthKey
if data['auth_key_data'] is not None:
if data.get('auth_key_data', None) is not None:
key = b64decode(data['auth_key_data'])
result.auth_key = AuthKey(data=key)