1.1 --- a/imiptools/handlers/scheduling.py Mon Oct 26 19:37:27 2015 +0100
1.2 +++ b/imiptools/handlers/scheduling.py Mon Oct 26 19:46:49 2015 +0100
1.3 @@ -53,6 +53,8 @@
1.4 returning an indication of the kind of response to be returned.
1.5 """
1.6
1.7 + obj = handler.obj.copy()
1.8 +
1.9 # Check any constraints on the request.
1.10
1.11 try:
1.12 @@ -66,6 +68,12 @@
1.13 # With a valid request, determine whether the event can be scheduled.
1.14
1.15 scheduled = schedule_in_freebusy(handler)
1.16 +
1.17 + # Restore the original object if it was corrected but could not be
1.18 + # scheduled.
1.19 +
1.20 + if scheduled == "DECLINED" and corrected:
1.21 + handler.set_object(obj)
1.22
1.23 # Where the corrected object can be scheduled, issue a counter
1.24 # request.