Skip to content

Commit 2e20650

Browse files
committed
Fix PATCH /state/v3 not clearing the device's is_running__release
Change-type: patch
1 parent eb55147 commit 2e20650

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/features/device-state/routes/state-patch-v3.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ export const statePatchV3: RequestHandler = async (req, res) => {
327327

328328
if (apps != null) {
329329
const userAppUuid = device.belongs_to__application[0].uuid;
330-
if (releasesByAppUuid[userAppUuid] != null) {
330+
if (Object.keys(apps).length === 0) {
331+
deviceBody.is_running__release = null;
332+
} else if (releasesByAppUuid[userAppUuid] != null) {
331333
const release = releasesByAppUuid[userAppUuid].find(
332334
(r) => r.commit === apps[userAppUuid].release_uuid,
333335
);

0 commit comments

Comments
 (0)