Commit 52167a78 authored by davelopez's avatar davelopez
Browse files

Fix collection `populated_state` error check

The backend returns `failed` and not `error` as `populated_state`
parent 3356ef6f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ var UPDATE_DELAY = 2000;
var NON_TERMINAL_STATES = ["new", "queued", "running", "waiting"];
var ERROR_STATES = ["error", "deleted"];
var TERMINAL_STATES = ["ok"].concat(ERROR_STATES);
const POPULATED_STATE_FAILED = "failed";
/** Fetch state on add or just wait for polling to start. */
var FETCH_STATE_ON_ADD = false;
var BATCH_FETCH_STATE = true;
@@ -27,7 +28,7 @@ var JobStatesSummary = Backbone.Model.extend({
    },

    errored: function () {
        return this.get("populated_state") === "error" || this.anyWithStates(ERROR_STATES);
        return this.get("populated_state") === POPULATED_STATE_FAILED || this.anyWithStates(ERROR_STATES);
    },

    states: function () {