mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-22 23:49:15 +00:00
refactor: maintain flat orders
This commit is contained in:
@@ -71,7 +71,7 @@ export async function addEvent(eventData: EventPostPayload): Promise<OntimeEntry
|
||||
}
|
||||
|
||||
// 2. if the user provides a parent (inside a group), we make sure it exists
|
||||
let parent: EntryId | undefined;
|
||||
let parent: EntryId | null = null;
|
||||
if ('parent' in eventData && eventData.parent != null) {
|
||||
if (!cache.hasId(eventData.parent)) {
|
||||
throw new Error(`Parent event with ID ${eventData.parent} not found`);
|
||||
|
||||
Reference in New Issue
Block a user