1.1 --- a/imiptools/editing.py Fri Nov 24 22:54:22 2017 +0100
1.2 +++ b/imiptools/editing.py Sat Nov 25 00:11:38 2017 +0100
1.3 @@ -250,6 +250,9 @@
1.4 return suggested
1.5
1.6 def get_conflicting_periods(self):
1.7 +
1.8 + "Return a set of periods that conflict with others."
1.9 +
1.10 periods = self.state.get("periods")
1.11 attendees = self.state.get("attendees")
1.12 conflicts = set()
1.13 @@ -1375,6 +1378,7 @@
1.14 """
1.15
1.16 active_periods = new + replaced + retained
1.17 + active_non_rule = filter(lambda p: p.origin != "RRULE", active_periods)
1.18
1.19 # Modified replaced and retained recurrences are used for incremental
1.20 # updates.
1.21 @@ -1433,7 +1437,7 @@
1.22 # Cancelled rule-originating periods must be excluded.
1.23
1.24 if not is_shared or new and not replaced:
1.25 - to_set = active_periods
1.26 + to_set = active_non_rule
1.27 to_exclude = list(chain(cancelled_rule, obsolete_rule))
1.28 to_unschedule = []
1.29 to_reschedule = []
1.30 @@ -1474,7 +1478,7 @@
1.31 # exceptions for removed periods or obsolete rule periods.
1.32
1.33 else:
1.34 - to_set = active_periods
1.35 + to_set = active_non_rule
1.36 to_exclude = list(chain(cancelled, obsolete_rule))
1.37 to_reschedule = []
1.38 all_unscheduled = []