Skip to content

Commit

Permalink
[1720][converters] return a list of tags instead of a tag string from…
Browse files Browse the repository at this point in the history
… convert_from_tags
  • Loading branch information
johnglover committed Feb 14, 2012
1 parent ed71452 commit c02e910
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/logic/converters.py
Expand Up @@ -77,11 +77,11 @@ def callable(key, data, errors, context):
if not v:
raise Invalid(_('Tag vocabulary "%s" does not exist') % vocab)

tags = {}
tags = []
for k in data.keys():
if k[0] == 'tags':
if data[k].get('vocabulary_id') == v.id:
tags[k] = data[k]
data[key] = ', '.join([t['name'] for t in tags.values()])
tags.append(data[k]['name'])
data[key] = tags
return callable

0 comments on commit c02e910

Please sign in to comment.