Skip to content

Commit

Permalink
obs unit needs filter_by_projects #2020
Browse files Browse the repository at this point in the history
  • Loading branch information
stuzart committed Oct 24, 2024
1 parent 12e4fed commit bee70be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/observation_unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ def related_publication_ids
assay_publication_ids
end

def self.filter_by_projects(projects)
joins(:projects).where(investigations: {investigations_projects: {project_id: projects}})
end

private

def study_matches_assays_if_present
Expand Down

0 comments on commit bee70be

Please sign in to comment.