mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-29 03:01:58 +08:00
Merge pull request #3301 from okriuchykhin/ok_SCI_5691
Hide empty projects in reports editor [SCI-5691]
This commit is contained in:
commit
b4b7783cd3
1 changed files with 6 additions and 3 deletions
|
@ -512,9 +512,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
|
||||
|
|
Loading…
Reference in a new issue