From b74d9e1526a01f9337ac2741a2e49265d22dd7a4 Mon Sep 17 00:00:00 2001 From: Aish1990 Date: Fri, 2 Aug 2024 18:06:11 +0530 Subject: [PATCH 1/2] external id fixed in all meterreads list --- apps/drec-api/src/pods/device/device.service.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/drec-api/src/pods/device/device.service.ts b/apps/drec-api/src/pods/device/device.service.ts index 200366393..89a4ed01c 100755 --- a/apps/drec-api/src/pods/device/device.service.ts +++ b/apps/drec-api/src/pods/device/device.service.ts @@ -137,10 +137,7 @@ export class DeviceService { pagenumber: number, ): Promise { this.logger.verbose(`With in getOrganizationDevices`); - if (pagenumber === null || pagenumber === undefined) { - pagenumber = 1; - } - if (Object.keys(filterDto).length != 0) { + if (Object.keys(filterDto).length != 0 && (pagenumber != null || pagenumber != undefined)) { const limit = 20; const query = await this.getFilteredQuery(filterDto); let where: any = query.where; From 0cde16dc9343607994759fab6d088ceb7692f5f8 Mon Sep 17 00:00:00 2001 From: Aish1990 Date: Fri, 2 Aug 2024 18:10:49 +0530 Subject: [PATCH 2/2] prettier fix --- apps/drec-api/src/pods/device/device.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/drec-api/src/pods/device/device.service.ts b/apps/drec-api/src/pods/device/device.service.ts index 89a4ed01c..1b22b42e1 100755 --- a/apps/drec-api/src/pods/device/device.service.ts +++ b/apps/drec-api/src/pods/device/device.service.ts @@ -137,7 +137,10 @@ export class DeviceService { pagenumber: number, ): Promise { this.logger.verbose(`With in getOrganizationDevices`); - if (Object.keys(filterDto).length != 0 && (pagenumber != null || pagenumber != undefined)) { + if ( + Object.keys(filterDto).length != 0 && + (pagenumber != null || pagenumber != undefined) + ) { const limit = 20; const query = await this.getFilteredQuery(filterDto); let where: any = query.where;