mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-21 14:37:49 +00:00
Merge pull request #2139 from balena-os/pin-device
Skip pin device step if release was deleted
This commit is contained in:
commit
cd268d8b48
@ -302,9 +302,11 @@ async function pinDevice({ app, commit }: DevicePinInfo) {
|
||||
|
||||
const releaseId: number | undefined = release?.[0]?.id;
|
||||
if (releaseId == null) {
|
||||
throw new Error(
|
||||
'Cannot continue pinning preloaded device! No release found!',
|
||||
log.warn(
|
||||
'Cannot pin device to release. Release no longer exists. Skipping.',
|
||||
);
|
||||
await config.remove('pinDevice');
|
||||
return;
|
||||
}
|
||||
|
||||
// We force a fresh get to make sure we have the latest state
|
||||
|
Loading…
Reference in New Issue
Block a user