Skip to content

Commit

Permalink
2869 Fixes problem with invalid data being passed to solr.
Browse files Browse the repository at this point in the history
The feeds take a page number from the query string and use it to determine the
start position in the list.  Occassionally this is 0 and code around line 441
then decrement and then multiply this number, generating a start number less than
0 which solr chokes on.
  • Loading branch information
rossjones committed Aug 16, 2012
1 parent 18f95bf commit 32ceeae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/controllers/feed.py
Expand Up @@ -432,7 +432,7 @@ def _parse_url_params(self):
"""

try:
page = int(request.params.get('page', 1))
page = int(request.params.get('page', 1)) or 1
except ValueError:
abort(400, ('"page" parameter must be an integer'))

Expand Down

0 comments on commit 32ceeae

Please sign in to comment.