File tree Expand file tree Collapse file tree
opensilex-core/src/main/java/org/opensilex/core/event/bll Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,6 +162,9 @@ public StringUriMap<List<MoveModel>> getMovesWithLocationPerTarget(List<URI> tar
162162 public ListWithPagination <MoveModel > searchMovesWithLocationObservation (MoveSearchFilter filter ) throws Exception {
163163 //Get moves
164164 ListWithPagination <MoveModel > moves = dao .search (filter );
165+ if (CollectionUtils .isEmpty (moves .getList ())){
166+ return moves ;
167+ }
165168 //Get locations
166169 List <LocationObservationModel > correspondingLocObs =
167170 getMovesCorrespondingLocationObservationModels (
@@ -741,6 +744,9 @@ private List<LocationObservationModel> getMovesCorrespondingLocationObservationM
741744 List <URI > modelUris ,
742745 LocationObservationLogic locObsLogic
743746 ){
747+ if (CollectionUtils .isEmpty (modelUris )){
748+ return Collections .emptyList ();
749+ }
744750 LocationObservationSearchFilter locationObservationSearchFilter = new LocationObservationSearchFilter ();
745751 locationObservationSearchFilter .setMoveUris (modelUris );
746752 locationObservationSearchFilter .setPageSize (ScientificObjectCsvImporterLogic .LOCATION_FETCHING_PAGE_SIZE );
You can’t perform that action at this time.
0 commit comments