fix(devices): fix device response parsing to get the list of devices (#15528)

Fixes #15053
This commit is contained in:
Jonathan Rainville 2024-07-11 09:58:08 -04:00 committed by GitHub
parent 01b4d1305d
commit 69e793277f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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