mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-21 22:05:02 +01:00
dspace_statistics_api/app.py: Use ORDER BY in /items
Since we are paging through the results by limit/offset we need to be sure that we are returning results deterministically.
This commit is contained in:
parent
8b924cf450
commit
4590fc8708
@ -31,7 +31,7 @@ class AllItemsResource:
|
||||
|
||||
# get statistics and use limit and offset to page through results
|
||||
cursor.execute(
|
||||
"SELECT id, views, downloads FROM items LIMIT %s OFFSET %s",
|
||||
"SELECT id, views, downloads FROM items ORDER BY id LIMIT %s OFFSET %s",
|
||||
[limit, offset],
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user