Skip to content

Commit

Permalink
Merge 0cd789f into cce1a1f
Browse files Browse the repository at this point in the history
  • Loading branch information
savass committed Apr 11, 2016
2 parents cce1a1f + 0cd789f commit 0de1966
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datatables/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def _json(self):
query = query.order_by(model_column.desc() if direction == "desc" else model_column.asc())

filtered_records = query.count()
query = query.slice(start, start + length)

if length > 0:
query = query.slice(start, start + length)

return {
"draw": draw,
Expand Down

0 comments on commit 0de1966

Please sign in to comment.