Calendar: fix update after delete does not show new events

Deleting the event caused a "hole" in daywise ID list, and trying to load that event's data failed.
This commit is contained in:
nathan 2023-04-04 08:39:10 -06:00
parent 1a5c20d8a0
commit 812aa63acb
2 changed files with 10 additions and 2 deletions

View File

@ -380,7 +380,11 @@ export class et2_calendar_daycol extends et2_valueWidget implements et2_IDetache
{
let event : any = egw.dataGetUIDdata('calendar::' + event_ids[i]);
event = event && event.data || false;
waitForGroups.push((<CalendarApp>app.calendar)._fetch_group_members(event).then(() =>
if(!event)
{
continue;
}
waitForGroups.push(((<CalendarApp>this.getInstanceManager().app_obj.calendar)._fetch_group_members(event)).then(() =>
{
if(event && event.date && et2_calendar_event.owner_check(event, this) && (
event.date === this.options.date ||

View File

@ -1916,7 +1916,11 @@ export class et2_calendar_planner extends et2_calendar_view implements et2_IDeta
{
for(var i = 0; i < data.length; i++)
{
var event = egw.dataGetUIDdata('calendar::' + data[i]);
let event = egw.dataGetUIDdata('calendar::' + data[i]);
if(!event || !event.data)
{
continue;
}
waitForGroups.push((<CalendarApp>app.calendar)._fetch_group_members(event.data));
}