1.1 --- a/imiptools/handlers/__init__.py Tue Apr 07 17:17:12 2015 +0200
1.2 +++ b/imiptools/handlers/__init__.py Tue Apr 07 18:57:35 2015 +0200
1.3 @@ -182,7 +182,7 @@
1.4
1.5 # Organisers employ a special transparency if not attending.
1.6
1.7 - if for_organiser or attr.get("PARTSTAT") != "DECLINED":
1.8 + if for_organiser or not attr or attr.get("PARTSTAT") != "DECLINED":
1.9 self.update_freebusy(freebusy, periods, transp=(
1.10 for_organiser and not attr.get("PARTSTAT") and "ORG" or None))
1.11 else:
1.12 @@ -217,10 +217,17 @@
1.13 periods = obj.get_periods_for_freebusy(self.get_tzid(), self.get_window_end())
1.14
1.15 # Record in the free/busy details unless a non-participating attendee.
1.16 + # Use any attendee information for an organiser, not the organiser's own
1.17 + # attributes.
1.18 +
1.19 + if for_organiser:
1.20 + participant_attr = obj.get_value_map("ATTENDEE").get(participant)
1.21
1.22 self.update_freebusy_for_participant(freebusy, periods, participant_attr,
1.23 for_organiser and not self.is_attendee(participant))
1.24
1.25 + # Tidy up any obsolete recurrences.
1.26 +
1.27 self.remove_freebusy_for_recurrences(freebusy, self.store.get_recurrences(self.user, self.uid))
1.28 self.store.set_freebusy_for_other(self.user, freebusy, participant)
1.29