Skip to content

Commit

Permalink
When page-size <=0, the pagination is disabled.
Browse files Browse the repository at this point in the history
JIRA: PDC-1636
  • Loading branch information
bliuredhat committed Aug 3, 2016
1 parent 92eb50c commit 40d37b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pdc_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,13 @@ def get_paged(self, res, **kwargs):
for release in client.get_paged(client['releases']._, active=True):
...
"""
if self.page_size:
if self.page_size is not None:
kwargs['page_size'] = self.page_size

if self.page_size <= 0 and self.page_size is not None:
# If page_size <= 0, pagination will be disable.
return res(**kwargs)

def worker():
kwargs['page'] = 1
while True:
Expand Down

0 comments on commit 40d37b0

Please sign in to comment.