mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix _get_entity_pair could receive None as input
This commit is contained in:
parent
d1e3237c41
commit
cb04e269c0
|
@ -583,6 +583,9 @@ def _get_entity_pair(entity_id, entities, cache,
|
|||
"""
|
||||
Returns ``(entity, input_entity)`` for the given entity ID.
|
||||
"""
|
||||
if not entity_id:
|
||||
return None, None
|
||||
|
||||
entity = entities.get(entity_id)
|
||||
try:
|
||||
input_entity = cache.get(resolve_id(entity_id)[0])._as_input_peer()
|
||||
|
|
Loading…
Reference in New Issue
Block a user