Commit 1d8d0068 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Call UUID overriding logic outside of the transaction

parent 6f8ad5c5
...@@ -21,6 +21,7 @@ module Security ...@@ -21,6 +21,7 @@ module Security
end end
def execute def execute
override_finding_uuids! if override_uuids?
set_security_scan_non_latest! if job.retried? set_security_scan_non_latest! if job.retried?
return deduplicate if security_scan.has_errors? || !security_scan.latest? || !security_scan.succeeded? return deduplicate if security_scan.has_errors? || !security_scan.latest? || !security_scan.succeeded?
...@@ -31,12 +32,11 @@ module Security ...@@ -31,12 +32,11 @@ module Security
private private
attr_reader :artifact, :known_keys, :deduplicate attr_reader :artifact, :known_keys, :deduplicate
delegate :project, :job, to: :artifact, private: true
def security_report delegate :project, :job, :security_report, to: :artifact, private: true
@security_report ||= artifact.security_report.tap do |report|
OverrideUuidsService.execute(report) if override_uuids? def override_finding_uuids!
end OverrideUuidsService.execute(security_report)
end end
def override_uuids? def override_uuids?
......
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