mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Assert hash is not None when migrating from JSON sessions
This commit is contained in:
@@ -163,7 +163,8 @@ class Session:
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user