From 8a3a9451e9b43caa643503444cacc7fa17ea9d17 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Mon, 26 Sep 2016 09:55:25 +0200 Subject: [PATCH] Fix issue with duplicate error messages in experiments modal [SCI-484] --- app/assets/javascripts/experiments/dropdown_actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/experiments/dropdown_actions.js b/app/assets/javascripts/experiments/dropdown_actions.js index eb093b18a..a15c27597 100644 --- a/app/assets/javascripts/experiments/dropdown_actions.js +++ b/app/assets/javascripts/experiments/dropdown_actions.js @@ -66,12 +66,12 @@ window.location.replace(data.path); }) .on('ajax:error', function(e, error) { + form.clearFormErrors(); var msg = JSON.parse(error.responseText); renderFormError(e, form.find("#experiment_project_id"), msg.message.toString()); - }) - .clearFormErrors(); + }); } } // Reload after successfully updated experiment