]> source.dussan.org Git - sonarqube.git/commitdiff
Fix warning
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 11 Oct 2012 12:08:46 +0000 (14:08 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 11 Oct 2012 12:08:59 +0000 (14:08 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb

index 08f0b5a92918c9aa61c0a41a773db0047b6af9a9..5d570c4964ab2eeb7b75c2adbe145f7b16470c62 100644 (file)
@@ -119,7 +119,7 @@ class DashboardController < ApplicationController
           prop.save!
         end
       end
-      widget.resource_id=Project.by_key(params[:resource_id]).id if params[:resource_id]
+      widget.resource_id=Project.by_key(params[:resource_id]).id if params[:resource_id].present?
       widget.configured=true
       widget.save!
       render :update do |page|