Fix _get_entity_pair could receive None as input

This commit is contained in:
Lonami Exo 2023-04-06 13:39:56 +02:00
parent d1e3237c41
commit cb04e269c0

View File

@ -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()