Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #172 from Kinto/sort-explicitly
Browse files Browse the repository at this point in the history
Sort changes explicitly by `last_modified` descending
  • Loading branch information
leplatrem committed May 26, 2020
2 parents b1637bd + 5e6d7fd commit fe35bbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Changelog
=========

i3.1.0 (unreleased)
-------------------

- Nothing changed yet.
3.1.0 (unreleased)
------------------

- Sort changes explicitly by `last_modified` descending

3.0.0 (2020-04-20)
------------------
Expand Down
3 changes: 2 additions & 1 deletion kinto_changes/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from kinto.authorization import RouteFactory
from kinto.core import resource
from kinto.core import utils as core_utils
from kinto.core.storage import Filter
from kinto.core.storage import Filter, Sort
from kinto.core.storage.memory import extract_object_set
from kinto.core.storage import exceptions as storage_exceptions
from kinto.core.utils import instance_uri, COMPARISON
Expand Down Expand Up @@ -183,6 +183,7 @@ def get_changeset(request):
id_field='id',
modified_field='last_modified',
deleted_field='deleted',
sorting=[Sort('last_modified', -1)]
)
# Fetch current collection timestamp.
timestamp = storage.resource_timestamp(resource_name="record", parent_id=collection_uri)
Expand Down

0 comments on commit fe35bbc

Please sign in to comment.