We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95d0bda commit 865881dCopy full SHA for 865881d
src/services/device-management/application.service.ts
@@ -95,11 +95,11 @@ export class ApplicationService {
95
.leftJoin("app.dataTargets", "dataTargets")
96
.where("app.belongsToId = :organizationId", { organizationId });
97
98
- if (whitelist != "admin" && whitelist.length > 0) {
+ if (whitelist !== "admin" && whitelist.length > 0) {
99
queryBuilder.andWhere("app.id IN (:...whitelist)", { whitelist });
100
}
101
102
- const count = await queryBuilder.select("COUNT(device.id)", "count").getRawOne();
+ const count = await queryBuilder.select("COUNT(DISTINCT(device.id))", "count").getRawOne();
103
104
try {
105
return count.count ? parseInt(count.count, 10) : 0;
0 commit comments