Allow uninstall in error state
This commit is contained in:
@@ -667,7 +667,9 @@ function checkAppState(app, state) {
|
||||
|
||||
if (app.taskId) return new AppsError(AppsError.BAD_STATE, `Not allowed in this app state : ${app.installationState} / ${app.runState}`);
|
||||
|
||||
if (state !== exports.ISTATE_PENDING_REPAIR && app.installationState === exports.ISTATE_ERROR) return new AppsError(AppsError.BAD_STATE, 'Not allowed in error state');
|
||||
if (app.installationState === exports.ISTATE_ERROR) {
|
||||
if (state !== exports.ISTATE_PENDING_REPAIR && state !== exports.ISTATE_PENDING_UNINSTALL) return new AppsError(AppsError.BAD_STATE, 'Not allowed in error state');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user