File tree Expand file tree Collapse file tree
src/main/java/fr/insee/genesis/domain Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ public List<ScheduleV2Dto> toScheduleV2Dtos() {
5050 }
5151
5252 return kraftwerkExecutionScheduleV2List .stream ()
53+ .filter (schedule -> schedule != null && schedule .getScheduleUuid () != null )
5354 .map (schedule -> ScheduleV2Dto .builder ()
5455 .scheduleUuid (schedule .getScheduleUuid ())
5556 .collectionInstrumentId (getResolvedCollectionInstrumentId ())
Original file line number Diff line number Diff line change @@ -337,18 +337,7 @@ public List<ScheduleV2Dto> getAllSchedulesV2() {
337337 );
338338
339339 return dataProcessingContextModels .stream ()
340- .flatMap (model -> {
341- if (model .getKraftwerkExecutionScheduleV2List () == null
342- || model .getKraftwerkExecutionScheduleV2List ().isEmpty ()) {
343- return Stream .of (
344- ScheduleV2Dto .builder ()
345- .collectionInstrumentId (model .getResolvedCollectionInstrumentId ())
346- .lastExecution (model .getLastExecution ())
347- .build ()
348- );
349- }
350- return model .toScheduleV2Dtos ().stream ();
351- })
340+ .flatMap (model -> model .toScheduleV2Dtos ().stream ())
352341 .toList ();
353342 }
354343
You can’t perform that action at this time.
0 commit comments