|
@@ -65,11 +65,11 @@ class Event {
|
|
|
}
|
|
}
|
|
|
const start = dayjs_1.default(obj.start);
|
|
const start = dayjs_1.default(obj.start);
|
|
|
const end = dayjs_1.default(obj.end);
|
|
const end = dayjs_1.default(obj.end);
|
|
|
- if (start.isValid()) {
|
|
|
|
|
|
|
+ if (!start.isValid()) {
|
|
|
throw new Error(`Error during the import of the Event '${obj.id}': Invalid starting date`);
|
|
throw new Error(`Error during the import of the Event '${obj.id}': Invalid starting date`);
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- if (end.isValid()) {
|
|
|
|
|
|
|
+ if (!end.isValid()) {
|
|
|
throw new Error(`Error during the import of the Event '${obj.id}': Invalid ending date`);
|
|
throw new Error(`Error during the import of the Event '${obj.id}': Invalid ending date`);
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|