Skip to content

Commit

Permalink
Merge pull request #1272 from okfn/1272-datastore-key-error
Browse files Browse the repository at this point in the history
fix possible KeyError in before_show of datastore plugin
  • Loading branch information
kindly committed Oct 9, 2013
2 parents e7266eb + 485f681 commit a8ac4a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/datastore/plugin.py
Expand Up @@ -285,7 +285,7 @@ def before_show(self, resource_dict):
''' Modify the resource url of datastore resources so that
they link to the datastore dumps.
'''
if resource_dict['url_type'] == 'datastore':
if resource_dict.get('url_type') == 'datastore':
resource_dict['url'] = p.toolkit.url_for(
controller='ckanext.datastore.controller:DatastoreController',
action='dump', resource_id=resource_dict['id'])
Expand Down

0 comments on commit a8ac4a6

Please sign in to comment.