diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-10-14 16:31:24 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-10-14 16:42:19 +0200 |
commit | 9ce2bfc0212b3b417b586864223773ed0b47f7c7 (patch) | |
tree | 1f561ee8df94c48f4afe7aa5a9a0cd2cd6cc3471 /server/sonar-web/src/main/webapp | |
parent | b40333bc5393c97d94f956c4e04e2f6953664af9 (diff) | |
download | sonarqube-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.rb | 6 |
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 |