diff options
Diffstat (limited to 'server')
-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 |