diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index 5e0635409..209460858 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -353,8 +353,11 @@ refreshCurrentView(); }).on('ajax:error', function(ev, data) { HelperModule.flashAlertMsg(data.responseJSON.message, 'danger'); - $(this).renderFormErrors('project', data.responseJSON.errors); - $(this).renderFormErrors('project_folder', data.responseJSON.errors); + if ($(this).hasClass('edit_project')) { + $(this).renderFormErrors('project', data.responseJSON.errors); + } else { + $(this).renderFormErrors('project_folder', data.responseJSON.errors); + } }); }); }