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

Commit

Permalink
[bugfix] Paginator should not start at 0 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
b1naryth1ef committed Aug 11, 2017
1 parent 3496d6f commit 4244727
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixes

- Fixed `Paginator` throwing an exception when reaching the end of pagination, instead of just ending its iteration
- Fixed `Paginator` defaulting to start at 0 for all iterations

## v0.0.11

Expand Down
2 changes: 1 addition & 1 deletion disco/util/paginator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self, func, sort_key, *args, **kwargs):

self._key = kwargs.pop('key', operator.attrgetter('id'))
self._bulk = kwargs.pop('bulk', False)
self._sort_key_value = kwargs.pop(self.sort_key, 0)
self._sort_key_value = kwargs.pop(self.sort_key, None)
self._buffer = []

def fill(self):
Expand Down

0 comments on commit 4244727

Please sign in to comment.