Skip to content

Commit a08a29f

Browse files
committed
fix(migration): correct notify telegram
1 parent 54c0642 commit a08a29f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/db/migrations/versions/5021dbccc95f_separate_notifications_channels.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ def upgrade() -> None:
5555
# Keep topic_id ONLY if we're using channel_id (not admin_id)
5656
# If using admin_id directly, topic_id doesn't make sense
5757
new_topic_id = telegram_topic_id if telegram_channel_id else None
58+
notify_telegram = old_settings.get("notify_telegram", False) if new_chat_id else False
5859

5960
# Create new settings structure
6061
new_settings = {
61-
"notify_telegram": old_settings.get("notify_telegram", False),
62+
"notify_telegram": notify_telegram,
6263
"notify_discord": old_settings.get("notify_discord", False),
6364
"telegram_api_token": old_settings.get("telegram_api_token"),
6465
"telegram_chat_id": new_chat_id,

0 commit comments

Comments
 (0)