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 (fieldsGroup.equals("listing")) {
|
||||||
if (!dataManagementPlanTableRequest.getCriteria().isOnlyPublic()) {
|
if (!dataManagementPlanTableRequest.getCriteria().isOnlyPublic()) {
|
||||||
itemsFuture = pagedItems.withHint(HintedModelFactory.getHint(DataManagementPlanListingModel.class))
|
itemsFuture = pagedItems.withHint(HintedModelFactory.getHint(DataManagementPlanListingModel.class))
|
||||||
|
.distinct()
|
||||||
.selectAsync(item -> {
|
.selectAsync(item -> {
|
||||||
item.setDataset(
|
item.setDataset(
|
||||||
item.getDataset().stream()
|
item.getDataset().stream()
|
||||||
|
@ -168,6 +169,7 @@ public class DataManagementPlanManager {
|
||||||
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
||||||
} else {
|
} else {
|
||||||
itemsFuture = pagedItems.withHint(HintedModelFactory.getHint(DataManagementPlanListingModel.class))
|
itemsFuture = pagedItems.withHint(HintedModelFactory.getHint(DataManagementPlanListingModel.class))
|
||||||
|
.distinct()
|
||||||
.selectAsync(item -> {
|
.selectAsync(item -> {
|
||||||
item.setDataset(
|
item.setDataset(
|
||||||
item.getDataset().stream()
|
item.getDataset().stream()
|
||||||
|
@ -178,10 +180,12 @@ public class DataManagementPlanManager {
|
||||||
}
|
}
|
||||||
} else if (fieldsGroup.equals("autocomplete")) {
|
} else if (fieldsGroup.equals("autocomplete")) {
|
||||||
itemsFuture = pagedItems
|
itemsFuture = pagedItems
|
||||||
|
.distinct()
|
||||||
.selectAsync(item -> new DataManagementPlanListingModel().fromDataModelAutoComplete(item))
|
.selectAsync(item -> new DataManagementPlanListingModel().fromDataModelAutoComplete(item))
|
||||||
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
||||||
} else {
|
} else {
|
||||||
itemsFuture = pagedItems
|
itemsFuture = pagedItems
|
||||||
|
.distinct()
|
||||||
.selectAsync(item -> new DataManagementPlanListingModel().fromDataModelAssociatedProfiles(item))
|
.selectAsync(item -> new DataManagementPlanListingModel().fromDataModelAssociatedProfiles(item))
|
||||||
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue