From: Guillaume Pellerin Date: Fri, 22 Jan 2016 16:01:13 +0000 (+0100) Subject: fix dump order X-Git-Tag: 1.6b~6^2~6 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=5315cce30e93ed1cf3c029b1ba9dd542e14fe071;p=telemeta.git fix dump order --- 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)