1.1 --- a/imiptools/handlers/scheduling/freebusy.py Sun Mar 06 00:46:26 2016 +0100
1.2 +++ b/imiptools/handlers/scheduling/freebusy.py Sun Mar 06 19:19:23 2016 +0100
1.3 @@ -103,17 +103,23 @@
1.4 # There should already be free/busy information for the user.
1.5
1.6 user_freebusy = handler.get_store().get_freebusy(handler.user)
1.7 - busy = user_freebusy
1.8 +
1.9 + # Maintain a separate copy of the data.
1.10 +
1.11 + busy = user_freebusy.copy()
1.12
1.13 # Subtract any periods from this event from the free/busy collections.
1.14
1.15 - event_periods = handler.remove_from_freebusy(user_freebusy)
1.16 + event_periods = handler.remove_from_freebusy(busy)
1.17
1.18 # Find busy periods for the other attendees.
1.19
1.20 for attendee in uri_values(handler.obj.get_values("ATTENDEE")):
1.21 if attendee != handler.user:
1.22 - freebusy = handler.get_store().get_freebusy_for_other(handler.user, attendee)
1.23 +
1.24 + # Get a copy of the attendee's free/busy data.
1.25 +
1.26 + freebusy = handler.get_store().get_freebusy_for_other(handler.user, attendee).copy()
1.27 if freebusy:
1.28 freebusy.remove_periods(event_periods)
1.29 busy += freebusy