aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/webapp
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-10-14 16:31:24 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-10-14 16:42:19 +0200
commit9ce2bfc0212b3b417b586864223773ed0b47f7c7 (patch)
tree1f561ee8df94c48f4afe7aa5a9a0cd2cd6cc3471 /server/sonar-web/src/main/webapp
parentb40333bc5393c97d94f956c4e04e2f6953664af9 (diff)
downloadsonarqube-9ce2bfc0212b3b417b586864223773ed0b47f7c7.tar.gz
sonarqube-9ce2bfc0212b3b417b586864223773ed0b47f7c7.zip
fix the components page of just provisioned project
Diffstat (limited to 'server/sonar-web/src/main/webapp')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/components_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/components_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/components_controller.rb
index c3fabf78a0d..093e1aad8ef 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/components_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/components_controller.rb
@@ -28,7 +28,11 @@ class ComponentsController < ApplicationController
def index
@components_configuration = Sonar::ComponentsConfiguration.new
- @snapshots = Snapshot.all(:include => 'project', :conditions => ['snapshots.parent_snapshot_id=?', @snapshot.id])
+ unless @snapshot.nil?
+ @snapshots = Snapshot.all(:include => 'project', :conditions => ['snapshots.parent_snapshot_id=?', @snapshot.id])
+ else
+ @snapshots = []
+ end
@columns = @components_configuration.selected_columns
metrics = @components_configuration.homepage_metrics