From 69e793277fefbb8f7cde3245a4119963a81ea88a Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 11 Jul 2024 09:58:08 -0400 Subject: [PATCH] fix(devices): fix device response parsing to get the list of devices (#15528) Fixes #15053 --- src/app_service/service/devices/service.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app_service/service/devices/service.nim b/src/app_service/service/devices/service.nim index ce6c1d6981..b1a0b6c5e5 100644 --- a/src/app_service/service/devices/service.nim +++ b/src/app_service/service/devices/service.nim @@ -124,7 +124,7 @@ QtObject: if responseObj{"error"}.kind != JNull and responseObj{"error"}.getStr != "": raise newException(CatchableError, responseObj{"error"}.getStr) - let installations = map(responseObj.getElems(), proc(x: JsonNode): InstallationDto = x.toInstallationDto()) + let installations = map(responseObj["response"].getElems(), proc(x: JsonNode): InstallationDto = x.toInstallationDto()) self.events.emit(SIGNAL_DEVICES_LOADED, DevicesArg(devices: installations)) except Exception as e: error "Erorr load devices async", msg = e.msg