From 1d5342c4c7a9cd0424a904bf7ec1ecf1d9671236 Mon Sep 17 00:00:00 2001 From: helmutm Date: Tue, 21 Dec 2010 18:15:13 +0000 Subject: [PATCH] correctly select events traversing the end of a month git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@4110 fd906abe-77d9-0310-91a1-e0d9ade77398 --- organize/browser/event.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/organize/browser/event.py b/organize/browser/event.py index 6c85845..9339563 100644 --- a/organize/browser/event.py +++ b/organize/browser/event.py @@ -180,7 +180,8 @@ class CalendarInfo(NodeView): relViews = (view.childViewFactory(r, self.request, contextIsSecond=True) for r in tEvent.getChildRelations([hasType], sort=None)) events = sorted((rv for rv in relViews - if rv.adapted.start >= start and rv.adapted.start < end), + #if rv.adapted.start >= start and rv.adapted.start < end), + if rv.adapted.end >= start and rv.adapted.start <= end), key=lambda x: (x.adapted.start, x.adapted.end)) for ev in events: startDay = ev.adapted.start.day