mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-22 23:49:15 +00:00
fix: allow empty string as a cue value
This commit is contained in:
committed by
Carlos Valente
parent
6ffe34a642
commit
1e63238cac
@@ -9,7 +9,6 @@ import {
|
|||||||
isOntimeEvent,
|
isOntimeEvent,
|
||||||
OntimeBlock,
|
OntimeBlock,
|
||||||
OntimeEntry,
|
OntimeEntry,
|
||||||
OntimeEvent,
|
|
||||||
PatchWithId,
|
PatchWithId,
|
||||||
RefetchKey,
|
RefetchKey,
|
||||||
Rundown,
|
Rundown,
|
||||||
@@ -101,11 +100,6 @@ export async function editEntry(patch: PatchWithId): Promise<OntimeEntry> {
|
|||||||
throw new Error('Entry not found');
|
throw new Error('Entry not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
// we dont allow the user to change the cue to empty string
|
|
||||||
if ((patch as Partial<OntimeEvent>)?.cue === '') {
|
|
||||||
throw new Error('Cue value invalid');
|
|
||||||
}
|
|
||||||
|
|
||||||
// we cannot allow patching to a different type
|
// we cannot allow patching to a different type
|
||||||
if (patch?.type && currentEntry.type !== patch.type) {
|
if (patch?.type && currentEntry.type !== patch.type) {
|
||||||
throw new Error('Invalid event type');
|
throw new Error('Invalid event type');
|
||||||
|
|||||||
Reference in New Issue
Block a user