From bea7ce21946a8d9f026d4b2f756f68a557dad124 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Fri, 2 Nov 2018 16:26:29 +0300 Subject: [PATCH] Extra code was removed --- cvat/apps/git/static/git/js/dashboardPlugin.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/cvat/apps/git/static/git/js/dashboardPlugin.js b/cvat/apps/git/static/git/js/dashboardPlugin.js index 2045406ba886..32efeab8520d 100644 --- a/cvat/apps/git/static/git/js/dashboardPlugin.js +++ b/cvat/apps/git/static/git/js/dashboardPlugin.js @@ -304,7 +304,7 @@ 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(); } @@ -312,23 +312,13 @@ document.addEventListener("DOMContentLoaded", () => { 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(); - } - } }); });