From e1917c4658d5344c61062edb4ebdd50d85036f79 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Mon, 10 Feb 2014 16:31:04 +0100 Subject: [PATCH 1/1] each object might have different type (pic vs book) --- apps/catalogue/templatetags/catalogue_tags.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index 0800865ee..a6115d97b 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -366,8 +366,8 @@ def book_mini(book, with_link=True): def work_list(context, object_list): request = context.get('request') for obj in object_list: - obj.object_type = type(object_list[0]).__name__ - + obj.object_type = type(obj).__name__ + return locals() -- 2.20.1