Merge branch 'ui-redesign' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot into ui-redesign

This commit is contained in:
apapachristou 2020-07-29 18:04:26 +03:00
commit 323b74048e
1 changed files with 4 additions and 2 deletions

View File

@ -188,7 +188,7 @@ public class DatasetManager {
DataTableData<DatasetListingModel> dataTable = new DataTableData<>();
dataTable.setData(pagedItems.select(this::mapModel));
dataTable.setData(pagedItems.select(this::mapModel).stream().filter(Objects::nonNull).collect(Collectors.toList()));
dataTable.setTotalCount(authItems.count());
@ -239,7 +239,7 @@ public class DatasetManager {
CompletableFuture<List<DatasetListingModel>> itemsFuture = pagedItems.
selectAsync(this::mapModel).whenComplete((resultList, throwable) -> {
dataTable.setData(resultList);
dataTable.setData(resultList.stream().filter(Objects::nonNull).collect(Collectors.toList()));
});
CompletableFuture countFuture = pagedItems.countAsync().whenComplete((count, throwable) -> {
@ -1049,6 +1049,8 @@ public class DatasetManager {
@Transactional
private DatasetListingModel mapModel(Dataset item) {
if (item.getProfile() == null)
return null;
DatasetListingModel listingModel = new DatasetListingModel().fromDataModel(item);
DatasetProfileCriteria criteria = new DatasetProfileCriteria();
criteria.setGroupIds(Collections.singletonList(item.getProfile().getGroupId()));