Commit 64b61b7f authored by drew cimino's avatar drew cimino

Remove ci_builds join from Security::Finding.by_build_ids

parent 87e7ec3e
......@@ -22,7 +22,7 @@ module Security
validates :uuid, presence: true
scope :by_uuid, -> (uuids) { where(uuid: uuids) }
scope :by_build_ids, -> (build_ids) { joins(scan: :build).where(ci_builds: { id: build_ids }) }
scope :by_build_ids, -> (build_ids) { joins(:scan).where(security_scans: { build_id: build_ids }) }
scope :by_project_fingerprints, -> (fingerprints) { where(project_fingerprint: fingerprints) }
scope :by_severity_levels, -> (severity_levels) { where(severity: severity_levels) }
scope :by_confidence_levels, -> (confidence_levels) { where(confidence: confidence_levels) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment