1.1 --- a/imiptools/editing.py Tue Dec 12 00:05:22 2017 +0100
1.2 +++ b/imiptools/editing.py Tue Dec 12 00:10:43 2017 +0100
1.3 @@ -635,7 +635,7 @@
1.4 # Make the status of the period compatible.
1.5
1.6 period.cancelled = False
1.7 - period.origin = "DTSTART-RECUR"
1.8 + period.origin = "RDATE"
1.9
1.10 # Either replace or add the period.
1.11
1.12 @@ -673,7 +673,6 @@
1.13 # Make replacements from existing periods and cancel them.
1.14
1.15 if p.recurrenceid:
1.16 - p.replacement = True
1.17 p.cancelled = cancelled
1.18
1.19 # Remove new periods completely.
1.20 @@ -1353,6 +1352,11 @@
1.21 if p.new_replacement:
1.22 p.new_replacement = False
1.23
1.24 + # Cancelled unedited periods.
1.25 +
1.26 + elif op:
1.27 + replaced.append(p)
1.28 +
1.29 # New periods without corresponding unedited periods.
1.30
1.31 elif p: