Skip to content

Commit

Permalink
fix for local use of datastore api
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Oct 17, 2013
1 parent 4cd9658 commit 16ffb33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckanext/datastore/db.py
Expand Up @@ -803,7 +803,10 @@ def _insert_links(data_dict, limit, offset):

# get the url from the request
import ckan.plugins.toolkit as toolkit
urlstring = toolkit.request.environ['CKAN_CURRENT_URL']
try:
urlstring = toolkit.request.environ['CKAN_CURRENT_URL']
except TypeError:
return # no links required for local actions

# change the offset in the url
parsed = list(urlparse.urlparse(urlstring))
Expand Down

0 comments on commit 16ffb33

Please sign in to comment.