Fixed issue with DMPs that are having a user assigned multiple times
This commit is contained in:
parent
916557db0a
commit
aa930f097a
|
@ -155,6 +155,7 @@ public class DataManagementPlanManager {
|
|||
if (fieldsGroup.equals("listing")) {
|
||||
if (!dataManagementPlanTableRequest.getCriteria().isOnlyPublic()) {
|
||||
itemsFuture = pagedItems.withHint(HintedModelFactory.getHint(DataManagementPlanListingModel.class))
|
||||
.distinct()
|
||||
.selectAsync(item -> {
|
||||
item.setDataset(
|
||||
item.getDataset().stream()
|
||||
|
@ -168,6 +169,7 @@ public class DataManagementPlanManager {
|
|||
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
||||
} else {
|
||||
itemsFuture = pagedItems.withHint(HintedModelFactory.getHint(DataManagementPlanListingModel.class))
|
||||
.distinct()
|
||||
.selectAsync(item -> {
|
||||
item.setDataset(
|
||||
item.getDataset().stream()
|
||||
|
@ -178,10 +180,12 @@ public class DataManagementPlanManager {
|
|||
}
|
||||
} else if (fieldsGroup.equals("autocomplete")) {
|
||||
itemsFuture = pagedItems
|
||||
.distinct()
|
||||
.selectAsync(item -> new DataManagementPlanListingModel().fromDataModelAutoComplete(item))
|
||||
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
||||
} else {
|
||||
itemsFuture = pagedItems
|
||||
.distinct()
|
||||
.selectAsync(item -> new DataManagementPlanListingModel().fromDataModelAssociatedProfiles(item))
|
||||
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue