do_delete_messages_by_sender: Add missing list conversion.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-05-03 17:10:10 -07:00 committed by Tim Abbott
parent f4489c381c
commit b405780561
1 changed files with 1 additions and 1 deletions

View File

@ -4609,7 +4609,7 @@ def do_delete_messages(realm: Realm, messages: Iterable[Message]) -> None:
send_event(realm, event, users_to_notify)
def do_delete_messages_by_sender(user: UserProfile) -> None:
message_ids = Message.objects.filter(sender=user).values_list('id', flat=True).order_by('id')
message_ids = list(Message.objects.filter(sender=user).values_list('id', flat=True).order_by('id'))
if message_ids:
move_messages_to_archive(message_ids)