API-29: Fixing bug where event latest_start_date would be null for deleted events
All checks were successful
Jenkins Production Deployment
All checks were successful
Jenkins Production Deployment
This commit is contained in:
parent
558d076537
commit
600abd16dd
|
@ -54,8 +54,11 @@ export const getChanges = async (course: string, week: string): Promise<Event[]>
|
|||
if (eventsMap.has(row.entry_id)) {
|
||||
let event = eventsMap.get(row.entry_id);
|
||||
|
||||
event.latest_event_summary = row.new_summary;
|
||||
event.latest_start_date = row.new_start;
|
||||
// Only adjust these fields if the event is not deleted as otherwise they would be null
|
||||
if (!row.isDeleted) {
|
||||
event.latest_event_summary = row.new_summary;
|
||||
event.latest_start_date = row.new_start;
|
||||
}
|
||||
event.changes.push(change);
|
||||
|
||||
eventsMap.set(row.entry_id, event);
|
||||
|
|
Loading…
Reference in New Issue
Block a user