From d868b43d52500e92f1dc721840eb89f40842104c Mon Sep 17 00:00:00 2001 From: isra el Date: Sun, 8 Jun 2025 21:55:20 +0300 Subject: [PATCH] fix(api): fix device deactivation issue during new version update --- api/src/gateway/gateway.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/gateway/gateway.service.ts b/api/src/gateway/gateway.service.ts index f2a7c40..dba2507 100644 --- a/api/src/gateway/gateway.service.ts +++ b/api/src/gateway/gateway.service.ts @@ -77,6 +77,10 @@ export class GatewayService { ) } + if (input.enabled !== false) { + input.enabled = true; + } + return await this.deviceModel.findByIdAndUpdate( deviceId, { $set: input },