web/views/calendar.py
branchtls-sprint
changeset 1799 183acfaa3cde
parent 1644 45bec81a9e1c
child 1800 05c36cf3c813
--- a/web/views/calendar.py	Wed May 13 19:51:30 2009 +0200
+++ b/web/views/calendar.py	Thu May 14 08:35:19 2009 +0200
@@ -11,7 +11,7 @@
 
 from cubicweb.interfaces import ICalendarable
 from cubicweb.selectors import implements
-from cubicweb.utils import strptime, date_range, todate
+from cubicweb.utils import strptime, date_range, todate, todatetime
 from cubicweb.view import EntityView
 from cubicweb.web import ajax_replace_url
 
@@ -116,7 +116,7 @@
 
     def in_working_hours(self):
         """predicate returning True is the task is in working hours"""
-        if self.task.start.hour > 7 and self.task.stop.hour < 20:
+        if todatetime(self.task.start).hour > 7 and todatetime(self.task.stop).hour < 20:
             return True
         return False