Skip to content

Commit

Permalink
[#1725] Fix exception caught when there's no CKAN_CURRENT_URL
Browse files Browse the repository at this point in the history
When we try to get a key from a dict and it doesn't exist, a KeyError is
raised, not a TypeError.
  • Loading branch information
vitorbaptista committed May 24, 2014
1 parent 3fed29c commit 99cc092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/datastore/db.py
Expand Up @@ -847,7 +847,7 @@ def _insert_links(data_dict, limit, offset):
# get the url from the request
try:
urlstring = toolkit.request.environ['CKAN_CURRENT_URL']
except TypeError:
except KeyError:
return # no links required for local actions

# change the offset in the url
Expand Down

0 comments on commit 99cc092

Please sign in to comment.