]> git.parisson.com Git - telemeta.git/commitdiff
fix dump order
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 22 Jan 2016 16:01:13 +0000 (17:01 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 22 Jan 2016 16:01:13 +0000 (17:01 +0100)
telemeta/management/commands/telemeta-export-all-to-csv.py

index 750988b7fa2d8cc3aef9f8445b7711cf298f6075..582072226dfd921457f0799b38bf9f13c3106677 100644 (file)
@@ -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)