Skip to content

Commit

Permalink
Assert hash is not None when migrating from JSON sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonami committed Jan 10, 2018
1 parent 146a91f commit 045f7f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion telethon/tl/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ def _check_migrate_json(self):

rows = []
for p_id, p_hash in data.get('entities', []):
rows.append((p_id, p_hash, None, None, None))
if p_hash is not None:
rows.append((p_id, p_hash, None, None, None))
return rows
except UnicodeDecodeError:
return [] # No entities
Expand Down

0 comments on commit 045f7f5

Please sign in to comment.