Make DMP total count to use distinct in order to avoid counting duplicate entries

This commit is contained in:
George Kalampokis 2020-07-06 14:11:14 +03:00
parent d10615d13a
commit 84bb291cd6
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ public class DataManagementPlanManager {
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
}
CompletableFuture countFuture = authItems.countAsync().whenComplete((count, throwable) -> dataTable.setTotalCount(count));
CompletableFuture countFuture = authItems.distinct().countAsync().whenComplete((count, throwable) -> dataTable.setTotalCount(count));
CompletableFuture.allOf(itemsFuture, countFuture).join();
return dataTable;
}