1
0
mirror of https://github.com/etesync/server synced 2024-11-25 10:18:12 +00:00

Serve snapshots newest to oldest.

This commit is contained in:
Tom Hacohen 2020-02-20 18:41:07 +02:00
parent c3fc00b9d8
commit 052483d38c

View File

@ -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)