From fcf8ea15419d2b9ce1321805d14dda15cbe08ee7 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 4 Sep 2013 13:10:21 +0200 Subject: [PATCH] Improve error message when creating duplicate dashboard. --- .../webapp/WEB-INF/app/controllers/dashboards_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb index 89e3b42a34f..bd86055c0d5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb @@ -59,7 +59,7 @@ class DashboardsController < ApplicationController active_dashboard = current_user.active_dashboards.to_a.find { |ad| ad.name==@dashboard.name } if active_dashboard - @dashboard.errors.add(Api::Utils.message('dashboard.error_create_existing_name')) + @dashboard.errors.add_to_base(Api::Utils.message('dashboard.error_create_existing_name')) render :partial => 'dashboards/create_form', :status => 400, :resource => params[:resource] elsif @dashboard.save add_default_dashboards_if_first_user_dashboard(@dashboard.global?) -- 2.39.5