1.1 --- a/imiptools/handlers/__init__.py Sun Mar 22 18:37:13 2015 +0100
1.2 +++ b/imiptools/handlers/__init__.py Sun Mar 22 19:04:48 2015 +0100
1.3 @@ -202,7 +202,17 @@
1.4 freebusy = self.store.get_freebusy_for_other(user, participant)
1.5 tzid = self.get_tzid(user)
1.6 window_end = get_window_end(tzid)
1.7 - periods = self.obj.get_periods_for_freebusy(tzid, window_end)
1.8 +
1.9 + # Obtain the stored object if the current object is not issued by the
1.10 + # organiser.
1.11 +
1.12 + obj = for_organiser and self.obj or self.get_object(user)
1.13 + if not obj:
1.14 + return
1.15 +
1.16 + # Obtain the affected periods.
1.17 +
1.18 + periods = obj.get_periods_for_freebusy(tzid, window_end)
1.19
1.20 # Record in the free/busy details unless a non-participating attendee.
1.21