# HG changeset patch # User Paul Boddie # Date 1427047488 -3600 # Node ID b98f64c7e5592e24fb0caa3b40eee9efebf14724 # Parent 674485854ec080e15b27a05cc08a17b18d490d8d Use stored objects when updating attendee free/busy period details. diff -r 674485854ec0 -r b98f64c7e559 imiptools/handlers/__init__.py --- a/imiptools/handlers/__init__.py Sun Mar 22 18:37:13 2015 +0100 +++ b/imiptools/handlers/__init__.py Sun Mar 22 19:04:48 2015 +0100 @@ -202,7 +202,17 @@ freebusy = self.store.get_freebusy_for_other(user, participant) tzid = self.get_tzid(user) window_end = get_window_end(tzid) - periods = self.obj.get_periods_for_freebusy(tzid, window_end) + + # Obtain the stored object if the current object is not issued by the + # organiser. + + obj = for_organiser and self.obj or self.get_object(user) + if not obj: + return + + # Obtain the affected periods. + + periods = obj.get_periods_for_freebusy(tzid, window_end) # Record in the free/busy details unless a non-participating attendee.