Skip to content
代码片段 群组 项目
未验证 提交 d22974b9 编辑于 作者: Sashi Kumar Kumaresan's avatar Sashi Kumar Kumaresan 提交者: GitLab
浏览文件

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>
No related branches found
No related tags found
无相关合并请求
...@@ -32,19 +32,15 @@ def execute ...@@ -32,19 +32,15 @@ def execute
vulnerability = Vulnerability.new vulnerability = Vulnerability.new
Gitlab::Database.allow_cross_joins_across_databases( Vulnerabilities::Finding.transaction do
url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/479586' save_vulnerability(vulnerability, finding)
) do rescue ActiveRecord::RecordNotFound
Vulnerabilities::Finding.transaction do vulnerability.errors.add(:base, _('finding is not found or is already attached to a vulnerability'))
save_vulnerability(vulnerability, finding) raise ActiveRecord::Rollback
rescue ActiveRecord::RecordNotFound end
vulnerability.errors.add(:base, _('finding is not found or is already attached to a vulnerability'))
raise ActiveRecord::Rollback if vulnerability.persisted?
end Statistics::UpdateService.update_for(vulnerability)
if vulnerability.persisted?
Statistics::UpdateService.update_for(vulnerability)
end
end end
vulnerability vulnerability
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册