Skip to content

Commit

Permalink
Merge pull request #457 from okfn/445-bug-multilingual-tests-failing-2
Browse files Browse the repository at this point in the history
[#445] Only lookup strings in term translation table
  • Loading branch information
vitorbaptista committed Feb 25, 2013
2 parents ec76832 + 1e8a1a2 commit e1b5fc9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ckanext/multilingual/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,11 @@ def before_index(self, search_data):
for key, value in search_data.iteritems():
if key in KEYS_TO_IGNORE or key.startswith('title'):
continue
if isinstance(value, list):
all_terms.extend(value)
elif value in (None, True, False):
continue
else:
all_terms.append(value)
if not isinstance(value, list):
value = [value]
for item in value:
if isinstance(item, basestring):
all_terms.append(item)

field_translations = action_get.term_translation_show(
{'model': ckan.model},
Expand Down

0 comments on commit e1b5fc9

Please sign in to comment.