imip-agent

Change of imiptools/handlers/person_outgoing.py

380:076eac8892de
imiptools/handlers/person_outgoing.py recurring-events
     1.1 --- a/imiptools/handlers/person_outgoing.py	Wed Mar 04 18:03:35 2015 +0100
     1.2 +++ b/imiptools/handlers/person_outgoing.py	Thu Mar 05 15:26:50 2015 +0100
     1.3 @@ -22,6 +22,7 @@
     1.4  
     1.5  from imiptools.content import Handler
     1.6  from imiptools.data import get_window_end, uri_dict, uri_item, uri_values
     1.7 +from imiptools.period import remove_affected_period
     1.8  
     1.9  class PersonHandler(Handler):
    1.10  
    1.11 @@ -69,10 +70,6 @@
    1.12  
    1.13          self.store.dequeue_request(identity, self.uid, self.recurrenceid)
    1.14  
    1.15 -        # Detach any recurrence from its parent.
    1.16 -
    1.17 -        self.detach_recurrence(identity)
    1.18 -
    1.19          # Update free/busy information.
    1.20  
    1.21          if update_freebusy:
    1.22 @@ -98,7 +95,12 @@
    1.23              self.update_freebusy_for_participant(freebusy, periods, attr,
    1.24                  from_organiser and self.is_not_attendee(identity, obj))
    1.25  
    1.26 -            self.remove_freebusy_for_original_recurrence(freebusy)
    1.27 +            # Subtract any recurrences from the free/busy details of a parent
    1.28 +            # object.
    1.29 +
    1.30 +            for recurrenceid in self.store.get_recurrences(identity, self.uid):
    1.31 +                remove_affected_period(freebusy, self.uid, recurrenceid)
    1.32 +
    1.33              self.store.set_freebusy(identity, freebusy)
    1.34  
    1.35              if self.publisher: