Skip to content
代码片段 群组 项目
提交 60ed42ef 编辑于 作者: Siddharth Dungarwal's avatar Siddharth Dungarwal
浏览文件

Merge branch 'andysoiron/update-unsafe_create_policy_for-comment' into 'master'

No related branches found
No related tags found
无相关合并请求
...@@ -45,7 +45,9 @@ def create_policy_for!(project:, name:, classification:, scan_result_policy_read ...@@ -45,7 +45,9 @@ def create_policy_for!(project:, name:, classification:, scan_result_policy_read
) )
end end
# This method will be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/395776 # This method can be used when called within a transaction.
# For example from Security::ProcessScanResultPolicyWorker.
# To avoid sub transactions the method does not call `safe_find_or_create_by!`.
def unsafe_create_policy_for!(project:, name:, classification:, scan_result_policy_read: nil) def unsafe_create_policy_for!(project:, name:, classification:, scan_result_policy_read: nil)
project.software_license_policies.create!( project.software_license_policies.create!(
classification: classification, classification: classification,
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册