From e927d217b3ad62c17b43c34ca5838c61fc1928e8 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 26 Oct 2011 12:52:26 +0200 Subject: [PATCH 1/1] fix --- apps/archive/templatetags/tags.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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} -- 2.20.1