mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 20:03:52 +00:00
Hotfix/4.0.0 (#48)
* validate time string * handle time entered in seconds * fix: id in delays and blocks
This commit is contained in:
@@ -34,7 +34,6 @@ import ua from 'universal-analytics';
|
||||
let isValid = validateFile(file);
|
||||
|
||||
if (isValid) {
|
||||
console.log('reading this');
|
||||
// Read data from JSON file, this will set db.data content
|
||||
await db.read();
|
||||
}
|
||||
|
||||
@@ -227,10 +227,14 @@ export const parseJsonv1 = async (jsonData) => {
|
||||
numEntries++;
|
||||
}
|
||||
} else if (e.type === 'delay') {
|
||||
events.push({ ...delayDef, duration: e.duration });
|
||||
events.push({
|
||||
...delayDef,
|
||||
duration: e.duration,
|
||||
id: e.id || generateId(),
|
||||
});
|
||||
numEntries++;
|
||||
} else if (e.type === 'block') {
|
||||
events.push({ ...blockDef });
|
||||
events.push({ ...blockDef, id: e.id || generateId() });
|
||||
numEntries++;
|
||||
} else {
|
||||
console.log('ERROR: undefined event type, skipping');
|
||||
|
||||
Reference in New Issue
Block a user