Slightly shorten the media_tags_as_string function

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-11-14 08:54:48 +01:00
parent 36c7d93481
commit 2a6a3b8cce

View File

@ -83,12 +83,10 @@ def media_tags_as_string(media_entry_tags):
This is the opposite of convert_to_tag_list_of_dicts This is the opposite of convert_to_tag_list_of_dicts
""" """
media_tag_string = '' tags_string = ''
if media_entry_tags: if media_entry_tags:
media_tag_string = u', '.join( tags_string = u', '.join([tag['name'] for tag in media_entry_tags])
[tag['name'] return tags_string
for tag in media_entry_tags])
return media_tag_string
TOO_LONG_TAG_WARNING = \ TOO_LONG_TAG_WARNING = \