[views] ticket #34808, make sure timetable view uses datetime and not date stable
authorSandrine Ribeau <sandrine.ribeau@logilab.fr>
Tue, 24 Nov 2009 11:10:33 -0800
branchstable
changeset 3917 0f912c1cde28
parent 3916 6e7af0e8e524
child 3918 0b7390acca7f
[views] ticket #34808, make sure timetable view uses datetime and not date
web/views/timetable.py
--- a/web/views/timetable.py	Tue Nov 24 17:27:10 2009 +0100
+++ b/web/views/timetable.py	Tue Nov 24 11:10:33 2009 -0800
@@ -10,7 +10,7 @@
 
 from cubicweb.interfaces import ITimetableViews
 from cubicweb.selectors import implements
-from cubicweb.utils import date_range
+from cubicweb.utils import date_range, todatetime
 from cubicweb.view import AnyRsetView
 
 
@@ -55,6 +55,7 @@
             elif task.stop:
                 the_dates.append(task.stop)
             for d in the_dates:
+                d = todatetime(d)
                 d_users = dates.setdefault(d, {})
                 u_tasks = d_users.setdefault(user, set())
                 u_tasks.add( task )