From aad3e67a019a7edcdab3fe7599f5319fdf883911 Mon Sep 17 00:00:00 2001 From: Tristan Lee Date: Sun, 25 Dec 2022 13:58:09 -0800 Subject: [PATCH] support if reply_to key doesn't exist in raw post --- cisticola/transformer/telegram_telethon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cisticola/transformer/telegram_telethon.py b/cisticola/transformer/telegram_telethon.py index cd9d575..f814712 100644 --- a/cisticola/transformer/telegram_telethon.py +++ b/cisticola/transformer/telegram_telethon.py @@ -161,7 +161,7 @@ class TelegramTelethonTransformer(Transformer): fwd_from = channel.id reply_to = None - if raw['reply_to']: + if raw.get('reply_to'): reply_to_id = str(raw['reply_to']['reply_to_msg_id']) post = session.query(Post).filter_by(channel=data.channel, platform_id=reply_to_id).first() if post is None: