export_messages_single_user: Fix missing order_by.

This fixes a nasty bug where exporting messages sent by a single user
might only contain some of the messages in the event that the
unspecified sort order by the database didn't happen to be sorted by
message ID.
This commit is contained in:
Tim Abbott 2016-08-14 13:05:36 -07:00
parent f952114010
commit f0a65fe52a
1 changed files with 1 additions and 1 deletions

View File

@ -1148,7 +1148,7 @@ def get_single_user_config():
def export_messages_single_user(user_profile, chunk_size=1000, output_dir=None): def export_messages_single_user(user_profile, chunk_size=1000, output_dir=None):
# type: (UserProfile, int, Path) -> None # type: (UserProfile, int, Path) -> None
user_message_query = UserMessage.objects.filter(user_profile=user_profile) user_message_query = UserMessage.objects.filter(user_profile=user_profile).order_by("id")
min_id = -1 min_id = -1
dump_file_id = 1 dump_file_id = 1
while True: while True: