web/views/calendar.py
changeset 5726 c3b99606644d
parent 5713 605f571198eb
child 5895 6a3f776292a5
equal deleted inserted replaced
5725:b5d595b66c35 5726:c3b99606644d
   393         dates = [[] for i in range(7)]
   393         dates = [[] for i in range(7)]
   394         task_colors = {}   # remember a color assigned to a task
   394         task_colors = {}   # remember a color assigned to a task
   395         # colors here are class names defined in cubicweb.css
   395         # colors here are class names defined in cubicweb.css
   396         colors = [ "col%x" % i for i in range(12) ]
   396         colors = [ "col%x" % i for i in range(12) ]
   397         next_color_index = 0
   397         next_color_index = 0
   398         done_tasks = []
   398         done_tasks = set()
   399         for row in xrange(self.cw_rset.rowcount):
   399         for row in xrange(self.cw_rset.rowcount):
   400             task = self.cw_rset.get_entity(row, 0)
   400             task = self.cw_rset.get_entity(row, 0)
   401             if task in done_tasks:
   401             if task.eid in done_tasks:
   402                 continue
   402                 continue
   403             done_tasks.append(task)
   403             done_tasks.add(task.eid)
   404             the_dates = []
   404             the_dates = []
   405             icalendarable = task.cw_adapt_to('ICalendarable')
   405             icalendarable = task.cw_adapt_to('ICalendarable')
   406             tstart = icalendarable.start
   406             tstart = icalendarable.start
   407             tstop = icalendarable.stop
   407             tstop = icalendarable.stop
   408             if tstart:
   408             if tstart: