From ce7d07a498e24332a608ae4a41ba8a1bfc4935d1 Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Wed, 19 Mar 2025 07:00:41 +0530 Subject: [PATCH] populate_db: Fix `is_channel_message` incorrectly set to True for DMs. We introduced `is_channel_message` flag in 90d76b692b42629185247. While populating messages in dev environment, we were not setting it to False for DMs / group DMs. This commit fixes that bug. --- zilencer/management/commands/populate_db.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zilencer/management/commands/populate_db.py b/zilencer/management/commands/populate_db.py index 6b932fd228..f7f6613582 100644 --- a/zilencer/management/commands/populate_db.py +++ b/zilencer/management/commands/populate_db.py @@ -1288,6 +1288,7 @@ def generate_and_send_messages( message.subject = random.choice(possible_topic_names[message.recipient.id]) saved_data["subject"] = message.subject + message.is_channel_message = recipient_type == Recipient.STREAM message.date_sent = choose_date_sent( num_messages, tot_messages, options["oldest_message_days"], options["threads"] )