Skip to content

Commit

Permalink
Fix PATCH /state/v3 not clearing the device's is_running__release
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
thgreasi committed Jan 22, 2025
1 parent eb55147 commit 2e20650
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/features/device-state/routes/state-patch-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ export const statePatchV3: RequestHandler = async (req, res) => {

if (apps != null) {
const userAppUuid = device.belongs_to__application[0].uuid;
if (releasesByAppUuid[userAppUuid] != null) {
if (Object.keys(apps).length === 0) {
deviceBody.is_running__release = null;
} else if (releasesByAppUuid[userAppUuid] != null) {
const release = releasesByAppUuid[userAppUuid].find(
(r) => r.commit === apps[userAppUuid].release_uuid,
);
Expand Down

0 comments on commit 2e20650

Please # to comment.