From 5dce1a40bc8ebd57e2a6a4e3f5ee0e3140bd541b Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Sun, 2 Nov 2025 13:26:17 +0100 Subject: [PATCH] refactor: prevent ids from being overriden --- apps/server/src/api-data/excel/excel.parser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/server/src/api-data/excel/excel.parser.ts b/apps/server/src/api-data/excel/excel.parser.ts index 52c978cad..5b40efe9a 100644 --- a/apps/server/src/api-data/excel/excel.parser.ts +++ b/apps/server/src/api-data/excel/excel.parser.ts @@ -184,8 +184,8 @@ export const parseExcel = ( // from excel, we can only get groups, milestones and events if (isOntimeGroup(entry as OntimeEntry)) { const group = { - id, // will be replaced by a potentially user given ID ...entry, + id, targetDuration: entry.duration ? entry.duration : null, custom: { ...entryCustomFields }, } as OntimeGroup; @@ -202,8 +202,8 @@ export const parseExcel = ( if (isOntimeMilestone(entry as OntimeEntry)) { const milestone = { - id, // will be replaced by a potentially user given ID ...entry, + id, custom: { ...entryCustomFields }, } as OntimeMilestone; if (currentGroupId) { @@ -219,8 +219,8 @@ export const parseExcel = ( // after group and milestones we only have events remaining const event = { - id, // will be replaced by a potentially user given ID ...entry, + id, custom: { ...entryCustomFields }, type: SupportedEntry.Event, } as OntimeEvent;