diff --git a/zerver/management/commands/fix_unreads.py b/zerver/management/commands/fix_unreads.py index 50966e06a9..2869b67f7c 100644 --- a/zerver/management/commands/fix_unreads.py +++ b/zerver/management/commands/fix_unreads.py @@ -187,6 +187,9 @@ def fix_pre_pointer(cursor, user_profile): find_non_muted_recipients ) + if not recipient_ids: + return + user_message_ids = [] def find_old_ids():