# HG changeset patch # User Paul Boddie # Date 1428425855 -7200 # Node ID 0d92bf9751a5e00a7dcd5540b9272cb527f2ea69 # Parent 07f73de8e8983d273d78bbca0c2f2dfbbcb712d5 Use any attendee information for an organiser, not the organiser's own attributes, when setting the free/busy status of the organiser. diff -r 07f73de8e898 -r 0d92bf9751a5 imiptools/handlers/__init__.py --- a/imiptools/handlers/__init__.py Tue Apr 07 17:17:12 2015 +0200 +++ b/imiptools/handlers/__init__.py Tue Apr 07 18:57:35 2015 +0200 @@ -182,7 +182,7 @@ # Organisers employ a special transparency if not attending. - if for_organiser or attr.get("PARTSTAT") != "DECLINED": + if for_organiser or not attr or attr.get("PARTSTAT") != "DECLINED": self.update_freebusy(freebusy, periods, transp=( for_organiser and not attr.get("PARTSTAT") and "ORG" or None)) else: @@ -217,10 +217,17 @@ periods = obj.get_periods_for_freebusy(self.get_tzid(), self.get_window_end()) # Record in the free/busy details unless a non-participating attendee. + # Use any attendee information for an organiser, not the organiser's own + # attributes. + + if for_organiser: + participant_attr = obj.get_value_map("ATTENDEE").get(participant) self.update_freebusy_for_participant(freebusy, periods, participant_attr, for_organiser and not self.is_attendee(participant)) + # Tidy up any obsolete recurrences. + self.remove_freebusy_for_recurrences(freebusy, self.store.get_recurrences(self.user, self.uid)) self.store.set_freebusy_for_other(self.user, freebusy, participant)