Skip to content
Snippets Groups Projects
Unverified Commit d22974b9 authored by Sashi Kumar's avatar Sashi Kumar Committed by GitLab
Browse files

Merge branch...

Merge branch '479586-resolve-cross-join-issues-in-gitlab-ee-app-services-vulnerabilities-create_service-rb' into 'master' 

Resolve cross join issues in gitlab/ee/app/services/vulnerabilities/create_service.rb

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169431



Merged-by: default avatarSashi Kumar Kumaresan <skumar@gitlab.com>
Approved-by: default avatarSashi Kumar Kumaresan <skumar@gitlab.com>
Co-authored-by: default avatarGregory <11164960-ghavenga@users.noreply.gitlab.com>
parents 57c247e9 69eb5c66
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -32,19 +32,15 @@ def execute
 
vulnerability = Vulnerability.new
 
Gitlab::Database.allow_cross_joins_across_databases(
url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/479586'
) do
Vulnerabilities::Finding.transaction do
save_vulnerability(vulnerability, finding)
rescue ActiveRecord::RecordNotFound
vulnerability.errors.add(:base, _('finding is not found or is already attached to a vulnerability'))
raise ActiveRecord::Rollback
end
if vulnerability.persisted?
Statistics::UpdateService.update_for(vulnerability)
end
Vulnerabilities::Finding.transaction do
save_vulnerability(vulnerability, finding)
rescue ActiveRecord::RecordNotFound
vulnerability.errors.add(:base, _('finding is not found or is already attached to a vulnerability'))
raise ActiveRecord::Rollback
end
if vulnerability.persisted?
Statistics::UpdateService.update_for(vulnerability)
end
 
vulnerability
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment