mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix edits for single instance of all day recurring event (#16354)
This commit is contained in:
parent
a209fadf18
commit
3a481ebb1a
@ -498,12 +498,22 @@ class DialogCalendarEventEditor extends LitElement {
|
|||||||
this._submitting = false;
|
this._submitting = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const eventData = this._calculateData();
|
||||||
|
if (eventData.rrule && range === RecurrenceRange.THISEVENT) {
|
||||||
|
// Updates to a single instance of a recurring event by definition
|
||||||
|
// cannot change the recurrence rule and doing so would be invalid.
|
||||||
|
// It is difficult to detect if the user changed the recurrence rule
|
||||||
|
// since updating the date may change it implicitly (e.g. day of week
|
||||||
|
// of the event changes) so we just assume the users intent based on
|
||||||
|
// recurrence range and drop any other rrule changes.
|
||||||
|
eventData.rrule = undefined;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
await updateCalendarEvent(
|
await updateCalendarEvent(
|
||||||
this.hass!,
|
this.hass!,
|
||||||
this._calendarId!,
|
this._calendarId!,
|
||||||
entry.uid!,
|
entry.uid!,
|
||||||
this._calculateData(),
|
eventData,
|
||||||
entry.recurrence_id || "",
|
entry.recurrence_id || "",
|
||||||
range!
|
range!
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user