Fix dupicate protocols in activities search [SCI-7171]

This commit is contained in:
Anton 2022-09-13 12:38:26 +02:00
parent e3ca916c2a
commit 4e32707245

View file

@ -145,6 +145,7 @@ class GlobalActivitiesController < ApplicationController
.order(name: :asc)
selected_subject = subject_search_params[:subjects]
matched = matched.where(my_module: nil) if subject == Protocol
matched = matched.where(project_id: selected_subject['Project']) if subject == Experiment
matched = matched.where(experiment_id: selected_subject['Experiment']) if subject == MyModule
matched = matched.where(repository_id: selected_subject['RepositoryBase']) if subject == RepositoryRow