web/views/calendar.py
changeset 5726 c3b99606644d
parent 5713 605f571198eb
child 5895 6a3f776292a5
--- a/web/views/calendar.py	Fri Jun 11 07:58:49 2010 +0200
+++ b/web/views/calendar.py	Fri Jun 11 07:58:52 2010 +0200
@@ -395,12 +395,12 @@
         # colors here are class names defined in cubicweb.css
         colors = [ "col%x" % i for i in range(12) ]
         next_color_index = 0
-        done_tasks = []
+        done_tasks = set()
         for row in xrange(self.cw_rset.rowcount):
             task = self.cw_rset.get_entity(row, 0)
-            if task in done_tasks:
+            if task.eid in done_tasks:
                 continue
-            done_tasks.append(task)
+            done_tasks.add(task.eid)
             the_dates = []
             icalendarable = task.cw_adapt_to('ICalendarable')
             tstart = icalendarable.start