Allow repair in non-errored state
This commit is contained in:
+1
-5
@@ -667,11 +667,7 @@ 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) {
|
||||
if (app.installationState !== exports.ISTATE_ERROR) return new AppsError(AppsError.BAD_STATE, 'Not allowed in error state');
|
||||
} else {
|
||||
if (app.installationState === exports.ISTATE_ERROR) return new AppsError(AppsError.BAD_STATE, 'Not allowed in error state');
|
||||
}
|
||||
if (state !== exports.ISTATE_PENDING_REPAIR && app.installationState === exports.ISTATE_ERROR) return new AppsError(AppsError.BAD_STATE, 'Not allowed in error state');
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user