From 052483d38c7776ac0b74c9cde73ecd5b82001222 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 20 Feb 2020 18:41:07 +0200 Subject: [PATCH] Serve snapshots newest to oldest. --- django_etesync/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_etesync/views.py b/django_etesync/views.py index e7a6f87..8e21e3c 100644 --- a/django_etesync/views.py +++ b/django_etesync/views.py @@ -153,7 +153,7 @@ class CollectionItemViewSet(BaseViewSet): col = get_object_or_404(Collection.objects, uid=collection_uid) col_it = get_object_or_404(col.items, uid=uid) - serializer = CollectionItemSnapshotSerializer(col_it.snapshots, many=True) + serializer = CollectionItemSnapshotSerializer(col_it.snapshots.order_by('-id'), many=True) return Response(serializer.data)