Commit de5678e9 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Remove cop disable comment and preload of associations

We can just use the auto generated enum methods instead of querying the
vulnerability feedbacks manually.
Also we are not using any of the preloaded associations in this finder
so loading them into memory is just waste of resources.
parent 1f176abf
......@@ -113,10 +113,10 @@ module Security
def dismissal_feedback_by_fingerprint
strong_memoize(:dismissal_feedback_by_fingerprint) do
pipeline.project.vulnerability_feedback
.with_associations
.where(feedback_type: 'dismissal') # rubocop:disable CodeReuse/ActiveRecord
.group_by(&:project_fingerprint)
pipeline.project
.vulnerability_feedback
.for_dismissal
.group_by(&:project_fingerprint)
end
end
......
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