Skip to content

Commit

Permalink
Extra code was removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Sekachev committed Nov 2, 2018
1 parent 5155246 commit bea7ce2
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions cvat/apps/git/static/git/js/dashboardPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,31 +304,21 @@ document.addEventListener("DOMContentLoaded", () => {
clearInterval(checkInterval);
if (data.status == "failed" || data.status == "unknown") {
let message = `Pushing process returned "${data.status}" status`;
badSituation(message);
window.cvat.git.badSituation(message);
}
window.cvat.git.updateState();
}
}).fail((data) => {
clearInterval(checkInterval);
let message = `Error was occured during pushing an repos entry. ` +
`Code: ${data.status}, text: ${data.responseText || data.statusText}`;
badSituation(message);
window.cvat.git.badSituation(message);
});
}, 1000);
}).fail((data) => {
let message = `Error was occured during pushing an repos entry. ` +
`Code: ${data.status}, text: ${data.responseText || data.statusText}`;
badSituation(message);
window.cvat.git.badSituation(message);
});

function badSituation(message) {
try {
showMessage(message);
throw Error(message);
}
finally {
window.cvat.git.updateState();
}
}
});
});

0 comments on commit bea7ce2

Please sign in to comment.