From 5315cce30e93ed1cf3c029b1ba9dd542e14fe071 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 22 Jan 2016 17:01:13 +0100 Subject: [PATCH] fix dump order --- telemeta/management/commands/telemeta-export-all-to-csv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telemeta/management/commands/telemeta-export-all-to-csv.py b/telemeta/management/commands/telemeta-export-all-to-csv.py index 750988b7..58207222 100644 --- a/telemeta/management/commands/telemeta-export-all-to-csv.py +++ b/telemeta/management/commands/telemeta-export-all-to-csv.py @@ -20,9 +20,9 @@ class Command(BaseCommand): element_type = args[-2] f = open(path, 'w') if element_type == "item": - elements = MediaItem.objects.all() + elements = MediaItem.objects.all().order_by('id') elif element_type == "collection": - elements = MediaCollection.objects.all() + elements = MediaCollection.objects.all().order_by('id') else: raise TypeError('type should be "item" or "collection"') writer = UnicodeWriter(f) -- 2.39.5