Skip to content

Commit

Permalink
Max out package_search rows limit (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
abulte authored May 24, 2019
1 parent 09dbf1b commit 3bfe956
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Current (in progress)

- Nothing yet
- Max out package_search rows limit [#100](https://github.com/opendatateam/udata-ckan/pull/98)

## 1.2.1 (2019-05-24)

Expand Down
4 changes: 3 additions & 1 deletion udata_ckan/harvesters.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ def initialize(self):
param = '-' + param
params.append(param)
q = ' AND '.join(params)
response = self.get_action('package_search', fix=fix, q=q)
# max out rows count to 1000 as per
# https://docs.ckan.org/en/latest/api/#ckan.logic.action.get.package_search
response = self.get_action('package_search', fix=fix, q=q, rows=1000)
names = [r['name'] for r in response['result']['results']]
else:
response = self.get_action('package_list', fix=fix)
Expand Down

0 comments on commit 3bfe956

Please sign in to comment.