Skip to content
Snippets Groups Projects

fix(DisseminationInfoPackageRepository): add missing left join (and add formatting)

Merged Mathieu.Vonlanthen requested to merge MVO-fix-missing-left-join into master
Files
2
@@ -270,13 +270,17 @@ public abstract class SearchController extends AccessIndexResourceReadOnlyContro
/*
* DIP already exists
*/
return new ResponseEntity<>("DIP already exists", HttpStatus.BAD_REQUEST);
final DisseminationInfoPackage dip = dipList.get(0);
if (dip.getOrders().size() != 1) {
return new ResponseEntity<>("Exactly one order should be associated to the DIP " + dip.getResId(), HttpStatus.INTERNAL_SERVER_ERROR);
}
return new ResponseEntity<>(dip.getOrders().get(0).getResId(), HttpStatus.ACCEPTED);
}
}
@Override
public HttpEntity<RestCollection<ArchiveMetadata>> search(@RequestParam(required = false) String query, Pageable pageable) {
// transform sort parameters from the portail to the corresponding name in the index
// transform sort parameters from the portal to the corresponding name in the index
if (!pageable.getSort().isEmpty() && pageable.getSort().isSorted()) {
pageable = PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), this.adaptSortProperties(pageable.getSort()));
}
@@ -288,7 +292,7 @@ public abstract class SearchController extends AccessIndexResourceReadOnlyContro
public HttpEntity<RestCollection<ArchiveMetadata>> searchPost(
@RequestBody(required = false) List<SearchCondition> searchConditions,
Pageable pageable) {
// transform sort parameters from the portail to the corresponding name in the index
// transform sort parameters from the portal to the corresponding name in the index
if (!pageable.getSort().isEmpty() && pageable.getSort().isSorted()) {
pageable = PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), this.adaptSortProperties(pageable.getSort()));
}
Loading