1.1 --- a/imiptools/handlers/__init__.py Fri May 15 14:55:23 2015 +0200
1.2 +++ b/imiptools/handlers/__init__.py Fri May 15 14:56:21 2015 +0200
1.3 @@ -130,7 +130,8 @@
1.4
1.5 "Remove this event from the given 'freebusy' collection."
1.6
1.7 - remove_period(freebusy, self.uid, self.recurrenceid)
1.8 + if not remove_period(freebusy, self.uid, self.recurrenceid) and self.recurrenceid:
1.9 + remove_affected_period(freebusy, self.uid, self.recurrenceid)
1.10
1.11 def remove_freebusy_for_recurrences(self, freebusy, recurrenceids=None):
1.12
2.1 --- a/imiptools/period.py Fri May 15 14:55:23 2015 +0200
2.2 +++ b/imiptools/period.py Fri May 15 14:56:21 2015 +0200
2.3 @@ -128,14 +128,18 @@
2.4 (which if omitted causes the "parent" object's periods to be referenced).
2.5 """
2.6
2.7 + removed = False
2.8 i = 0
2.9 while i < len(freebusy):
2.10 fb = freebusy[i]
2.11 if fb.uid == uid and fb.recurrenceid == recurrenceid:
2.12 del freebusy[i]
2.13 + removed = True
2.14 else:
2.15 i += 1
2.16
2.17 + return removed
2.18 +
2.19 def remove_additional_periods(freebusy, uid, recurrenceids=None):
2.20
2.21 """