From: Fabrice Bellingard Date: Mon, 8 Oct 2012 09:29:38 +0000 (+0200) Subject: Fix regression when saving widget configuration X-Git-Tag: 3.3~86 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=422de7b07eb1b281a27b7085e6fb49a36cf2eace;p=sonarqube.git Fix regression when saving widget configuration => params[:resource_id] can be null in case of non global dashboard --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb index a4d9cce2c80..08f0b5a9291 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb @@ -119,7 +119,7 @@ class DashboardController < ApplicationController prop.save! end end - widget.resource_id=Project.by_key(params[:resource_id]).id + widget.resource_id=Project.by_key(params[:resource_id]).id if params[:resource_id] widget.configured=true widget.save! render :update do |page|