Remove invalid occurrences when saving master

This commit is contained in:
Francis Lachapelle committed 2018-05-16 14:58:04 -04:00
1 parent 452083e767
commit 0c5b5446dd
4 files changed
+46 -13

No files matched your search

+14 -7
View File
@@ -317,16 +317,23 @@
}
count++;
}
// Add an date exception.
event = (iCalRepeatableEntityObject*)[calendar firstChildWithTag: [object componentTag]];
[event addToExceptionDates: recurrenceId];
[event increaseSequence];
[event setLastModified: [NSCalendarDate calendarDate]];
if (event)
{
[event addToExceptionDates: recurrenceId];
[event increaseSequence];
[event setLastModified: [NSCalendarDate calendarDate]];
// We save the updated iCalendar in the database.
[object saveCalendar: calendar];
// We save the updated iCalendar in the database.
[object saveCalendar: calendar];
}
else
{
// No more child; kill the parent
[object delete];
}
}
}
else