mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-06 16:03:52 +00:00
refactor: prevent ids from being overriden
This commit is contained in:
committed by
Carlos Valente
parent
b75b69c3b1
commit
5dce1a40bc
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user