Skip to content

Commit

Permalink
Fix exception if offset is not defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Sep 27, 2012
1 parent da3d9e1 commit 3d840fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckanext/datastore/db.py
Expand Up @@ -728,7 +728,8 @@ def _insert_links(data_dict, limit, offset):
arguments_start = dict(arguments)
arguments_prev = dict(arguments)
arguments_next = dict(arguments)
arguments_start.pop('offset')
if 'offset' in arguments_start:
arguments_start.pop('offset')
arguments_next['offset'] = int(offset) + int(limit)
arguments_prev['offset'] = int(offset) - int(limit)

Expand Down

0 comments on commit 3d840fe

Please sign in to comment.