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

Memoize the existing_scanners method

parent 82143017
......@@ -56,10 +56,10 @@ module Security
end
def existing_scanners
project.vulnerability_scanners
.with_external_id(scanner_external_ids)
.group_by(&:external_id)
.transform_values(&:first)
@existing_scanners ||= project.vulnerability_scanners
.with_external_id(scanner_external_ids)
.group_by(&:external_id)
.transform_values(&:first)
end
def scanner_external_ids
......
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