Skip to content

Commit

Permalink
Don't assume resource format is there
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Feb 27, 2015
1 parent 1940b79 commit 67cd44f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/textview/plugin.py
Expand Up @@ -69,7 +69,7 @@ def info(self):

def can_view(self, data_dict):
resource = data_dict['resource']
format_lower = resource['format'].lower()
format_lower = resource.get('format', '').lower()
proxy_enabled = p.plugin_loaded('resource_proxy')
same_domain = datapreview.on_same_domain(data_dict)
if format_lower in self.jsonp_formats:
Expand Down

0 comments on commit 67cd44f

Please sign in to comment.