Skip to content

Commit

Permalink
Merge branch 'master' of github.com:okfn/ckan
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Aug 16, 2012
2 parents f314b5e + aa710e4 commit f0da258
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckan/model/license.py
Expand Up @@ -153,7 +153,11 @@ class DefaultLicense(dict):
def __getitem__(self, key):
''' behave like a dict but get from attributes '''
if key in self.keys:
return unicode(getattr(self, key))
value = getattr(self, key)
if isinstance(value, str):
return unicode(value)
else:
return value
else:
raise KeyError()

Expand Down

0 comments on commit f0da258

Please sign in to comment.