From: Marcin Koziej Date: Mon, 10 Feb 2014 15:31:04 +0000 (+0100) Subject: each object might have different type (pic vs book) X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/e1917c4658d5344c61062edb4ebdd50d85036f79 each object might have different type (pic vs book) --- 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()