Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #236 from IATI/235-offset-calls
Browse files Browse the repository at this point in the history
[#235] Added order by clause for obtaining data from the database
  • Loading branch information
dalepotter committed May 12, 2015
2 parents dff77b9 + 9411130 commit 4751769
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iati_datastore/iatilib/frontend/api1.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def streaming(self):
def paginate(self, query, offset, limit):
if offset < 0:
abort(404)
items = query.limit(limit).offset(offset).all()
items = query.order_by('iati_identifier').limit(limit).offset(offset).all()
if not items and offset != 0:
abort(404)
return Scrollination(query, offset, limit, query.count(), items)
Expand Down

0 comments on commit 4751769

Please sign in to comment.