Skip to content

Commit

Permalink
[#2320] 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 eab2ab0 commit 4318bbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/textpreview/plugin.py
Expand Up @@ -63,7 +63,7 @@ def configure(self, config):

def can_preview(self, data_dict):
resource = data_dict['resource']
format_lower = resource['format'].lower()
format_lower = resource.get('format', '').lower()

quality = QUALITY.get(format_lower, 1)

Expand Down

0 comments on commit 4318bbe

Please sign in to comment.