diff --git a/src/main/java/fr/insee/genesis/controller/rest/ScheduleController.java b/src/main/java/fr/insee/genesis/controller/rest/ScheduleController.java index 2131930..d36effc 100644 --- a/src/main/java/fr/insee/genesis/controller/rest/ScheduleController.java +++ b/src/main/java/fr/insee/genesis/controller/rest/ScheduleController.java @@ -84,11 +84,19 @@ public ResponseEntity addSchedule( useSignature ); log.info("New schedule request for survey {} with encryption", surveyName); - scheduleApiPort.addSchedule(surveyName, serviceToCall, frequency, scheduleBeginDate, scheduleEndDate, + scheduleApiPort.addSchedule(surveyName, + serviceToCall == null ? ServiceToCall.MAIN : serviceToCall, + frequency, + scheduleBeginDate, + scheduleEndDate, trustParameters); }else{ log.info("New schedule request for survey {}", surveyName); - scheduleApiPort.addSchedule(surveyName, serviceToCall, frequency, scheduleBeginDate, scheduleEndDate, + scheduleApiPort.addSchedule(surveyName, + serviceToCall == null ? ServiceToCall.MAIN : serviceToCall, + frequency, + scheduleBeginDate, + scheduleEndDate, null); }