assert post is not None

This commit is contained in:
msramalho
2022-03-30 11:12:06 +02:00
parent 3bdeec1d2f
commit 8358ab0bfc

View File

@@ -37,7 +37,7 @@ class TelethonArchiver(Archiver):
posts = self.client.get_messages(chat, ids=search_ids)
media = []
for post in posts:
if post.grouped_id == original_post.grouped_id and post.media is not None:
if post is not None and post.grouped_id == original_post.grouped_id and post.media is not None:
media.append(post)
return media