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

Commit

Permalink
Added order by clause for obtaining data from the database
Browse files Browse the repository at this point in the history
  • Loading branch information
dalepotter committed May 11, 2015
1 parent dff77b9 commit 9411130
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 9411130

Please sign in to comment.