diff --git a/libs/device-manager/feature/src/hooks/use-device-manager-detached.ts b/libs/device-manager/feature/src/hooks/use-device-manager-detached.ts index ec825834ca..f78f5b0a25 100644 --- a/libs/device-manager/feature/src/hooks/use-device-manager-detached.ts +++ b/libs/device-manager/feature/src/hooks/use-device-manager-detached.ts @@ -16,6 +16,7 @@ import { import { activeDeviceIdSelector } from "active-device-registry/feature" import { abortDataMigration, + BackupProcessStatus, clearEntities, closeAllModals, DataMigrationStatus, @@ -136,8 +137,15 @@ const useHandleDevicesDetached = () => { if (apiEvents.length !== 0) { dispatch(closeAllModals()) - if (backupProcess) { - dispatch(setBackupProcessStatus("FAILED")) + if ( + backupProcess && + [ + BackupProcessStatus.PreBackup, + BackupProcessStatus.SaveFile, + BackupProcessStatus.FilesTransfer, + ].includes(backupProcess) + ) { + dispatch(setBackupProcessStatus(BackupProcessStatus.Failed)) } }