each object might have different type (pic vs book)
authorMarcin Koziej <marcin@lolownia.org>
Mon, 10 Feb 2014 15:31:04 +0000 (16:31 +0100)
committerMarcin Koziej <marcin@lolownia.org>
Mon, 10 Feb 2014 15:31:04 +0000 (16:31 +0100)
apps/catalogue/templatetags/catalogue_tags.py

index 0800865..a6115d9 100644 (file)
@@ -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()