Repository :
http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
---------------------------------------------------------------
commit 392f02c91bbea634c64b2cb14fd3aecaae7f4d9d
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Dec 13 13:12:54 2012 +0100
Fix the agenda_is_free_in_future
The goal of this function is to make sure the agenda is free for all
recursion of a recursive meeting.
---------------------------------------------------------------
fedocal/fedocallib/__init__.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fedocal/fedocallib/__init__.py b/fedocal/fedocallib/__init__.py
index 0c31269..e4a6542 100644
--- a/fedocal/fedocallib/__init__.py
+++ b/fedocal/fedocallib/__init__.py
@@ -462,7 +462,7 @@ def agenda_is_free(session, calendarobj, meeting_date,
def agenda_is_free_in_future(session, calendarobj, meeting_date,
- time_start, time_stop):
+ recursion_ends, time_start, time_stop):
"""For recursive meeting, check for meetings happening at the
specified time between the specified date and to the end of the
recursion.
@@ -475,7 +475,7 @@ def agenda_is_free_in_future(session, calendarobj, meeting_date,
:arg time_stop: the time at which the meeting stops (as int)
"""
meetings = get_by_date(session, calendarobj, meeting_date,
- meeting_date + timedelta(days=1))
+ recursion_ends)
agenda_free = True
for meeting in set(meetings):
if meeting.meeting_date != meeting_date:
@@ -714,7 +714,7 @@ def add_meeting(session, calendarobj, fas_user,
if frequency and end_repeats:
futur_meeting_at_time = agenda_is_free_in_future(session, calendarobj,
- meeting_date, meeting_time_start.time(),
+ meeting_date, end_repeats, meeting_time_start.time(),
meeting_time_stop.time())
if not bool(calendarobj.calendar_multiple_meetings) and \
@@ -804,8 +804,8 @@ def edit_meeting(session, meeting, calendarobj, fas_user,
if recursion_frequency and recursion_ends:
futur_meeting_at_time = agenda_is_free_in_future(session,
- calendarobj, meeting_date, meeting_time_start.time(),
- meeting_time_stop.time())
+ calendarobj, meeting_date, recursion_ends,
+ meeting_time_start.time(), meeting_time_stop.time())
if not bool(calendarobj.calendar_multiple_meetings) and \
not(futur_meeting_at_time):