@@ -65,11 +65,11 @@ class Event {
}
const start = dayjs_1.default(obj.start);
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`);
else {
- if (end.isValid()) {
+ if (!end.isValid()) {
throw new Error(`Error during the import of the Event '${obj.id}': Invalid ending date`);
@@ -92,10 +92,10 @@ export class Event implements IEvent, Selectable{
const start = dayjs(obj.start)
const end = dayjs(obj.end)
- if(start.isValid()){
+ if(!start.isValid()){
throw new Error(`Error during the import of the Event '${obj.id}': Invalid starting date`)
}else{
- if(end.isValid()){
+ if(!end.isValid()){
throw new Error(`Error during the import of the Event '${obj.id}': Invalid ending date`)