# HG changeset patch # User Paul Boddie # Date 1425337425 -3600 # Node ID 4d88a31c967a3958e7b1583e7e162e8f78c3f36a # Parent de744e6cc464bdd536d2b7a08b53debe2f29d2c0 Fixed attendee updating, removing the superfluous remaining attendees result. diff -r de744e6cc464 -r 4d88a31c967a imip_manager.py --- a/imip_manager.py Mon Mar 02 20:27:59 2015 +0100 +++ b/imip_manager.py Tue Mar 03 00:03:45 2015 +0100 @@ -140,8 +140,8 @@ """ Update the attendees in 'obj' with the given 'added' and 'removed' - attendee lists. A tuple is returned containing the remaining attendees, - together with the attendees whose attendance should be cancelled. + attendee lists. A list is returned containing the attendees whose + attendance should be cancelled. """ to_cancel = [] @@ -166,7 +166,7 @@ obj["ATTENDEE"] = attendees - return remaining, to_cancel + return to_cancel class ManagerHandler(Common, Handler): @@ -294,7 +294,7 @@ # Update the attendees in the event. - remaining, to_cancel = self.update_attendees(self.obj, added, removed) + to_cancel = self.update_attendees(self.obj, added, removed) self.update_dtstamp() self.set_sequence(update) @@ -305,6 +305,7 @@ # is now cancelled. if to_cancel: + remaining = self.obj["ATTENDEE"] self.obj["ATTENDEE"] = to_cancel self.send_message("CANCEL", get_address(organiser), for_organiser=True) @@ -662,7 +663,7 @@ # Save single user events. elif save: - remaining, to_cancel = self.update_attendees(obj, added, removed) + to_cancel = self.update_attendees(obj, added, removed) self.store.set_event(self.user, uid, None, node=obj.to_node()) self.update_freebusy(uid, None, obj=obj) self.remove_request(uid)