Commit 27ea8efc authored by Patrick Bair's avatar Patrick Bair

Merge branch 'remove-ci-join-from-security-finding' into 'master'

Remove ci_builds join from Security::Finding.by_build_ids

See merge request gitlab-org/gitlab!71614
parents 52d11faf 64b61b7f
......@@ -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