Ensure we reset the task states if taskId is gone
This commit is contained in:
@@ -100,15 +100,14 @@ function create(origin, accessToken, id) {
|
||||
for (const app of result.body.apps) {
|
||||
app.ssoAuth = app.sso && (app.manifest.addons['ldap'] || app.manifest.addons['oidc'] || app.manifest.addons['proxyAuth']); // checking app.sso first ensures app.manifest.addons is not null
|
||||
|
||||
if (app.accessLevel !== 'operator' && app.accessLevel !== 'admin') { // only fetch if we have permissions
|
||||
// only fetch if we have permissions and a taskId is set/active
|
||||
if (!app.taskId || (app.accessLevel !== 'operator' && app.accessLevel !== 'admin')) {
|
||||
app.progress = 0;
|
||||
app.message = '';
|
||||
app.taskMinutesActive = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!app.taskId) continue;
|
||||
|
||||
const task = await getTask(app.id);
|
||||
if (task) {
|
||||
app.progress = task.percent;
|
||||
|
||||
Reference in New Issue
Block a user