From: Radek Czajka Date: Wed, 26 Oct 2011 10:52:26 +0000 (+0200) Subject: fix X-Git-Url: https://git.mdrn.pl/audio.git/commitdiff_plain/e927d217b3ad62c17b43c34ca5838c61fc1928e8?ds=inline;hp=1afbdde3f6504b6e0505fd31a27c028ddc402f02 fix --- diff --git a/apps/archive/templatetags/tags.py b/apps/archive/templatetags/tags.py index 1067a4d..479443b 100755 --- a/apps/archive/templatetags/tags.py +++ b/apps/archive/templatetags/tags.py @@ -5,11 +5,12 @@ register = template.Library() @register.inclusion_tag('archive/tags/multiple_tags_table.html') def multiple_tags_table(tags, table=True): new_tags = {} - for k, v in tags.items(): - if isinstance(v, list): - new_tags[k] = v - else: - new_tags[k] = [v] + if tags: + for k, v in tags.items(): + if isinstance(v, list): + new_tags[k] = v + else: + new_tags[k] = [v] return {"tags": new_tags, "table": table}