diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index eee4239f9..a44515395 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -510,9 +510,12 @@ class ReportsController < ApplicationController def load_visible_projects render_404 unless current_team - @visible_projects = Project.viewable_by_user( - current_user, current_team - ).select(:id, :name) + @visible_projects = Project.active + .viewable_by_user(current_user, current_team) + .joins(experiments: :my_modules) + .merge(Experiment.active) + .merge(MyModule.active) + .select(:id, :name) end def load_available_repositories