Skip to content

Commit

Permalink
[multilingual] fix errors in multilingual extenstion
Browse files Browse the repository at this point in the history
  • Loading branch information
kindly committed Apr 27, 2012
1 parent 4d86346 commit ae5ad35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ckan/logic/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def callable(key, data, errors, context):
for k in data.keys():
if k[0] == 'tags':
if data[k].get('vocabulary_id') == v.id:
tags.append(data[k]['name'])
name = data[k].get('display_name', data[k]['name'])
tags.append(name)
data[key] = tags
return callable

2 changes: 1 addition & 1 deletion ckanext/multilingual/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def translate_data_dict(data_dict):
translated_flattened[key] = fallback_translations.get(
value, value)

elif isinstance(value, int):
elif isinstance(value, (int, dict)):
translated_flattened[key] = value

else:
Expand Down

0 comments on commit ae5ad35

Please sign in to comment.