Fix my_module_activities in AcitivtyService [SCI-6562] (#3908)

This commit is contained in:
artoscinote 2022-03-01 12:28:45 +01:00 committed by GitHub
parent 577f449b95
commit 87d202f3eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,7 +69,7 @@ class ActivitiesService
end
def self.my_module_activities(my_module)
subjects_with_children = load_subjects_children('MyModule': [my_module.id])
subjects_with_children = load_subjects_children('MyModule' => [my_module.id])
query = Activity.where(project: my_module.experiment.project)
query.where(
subjects_with_children.to_h.map { '(subject_type = ? AND subject_id IN(?))' }.join(' OR '),