Commit b845150f authored by Stan Hu's avatar Stan Hu

Merge branch '338969-remove-subtransaction-from-dast-site' into 'master'

Remove subtransaction from DastSite

See merge request gitlab-org/gitlab!69077
parents 21e92335 d43914ce
...@@ -7,7 +7,7 @@ module DastSites ...@@ -7,7 +7,7 @@ module DastSites
def execute!(url:) def execute!(url:)
raise PermissionsError, 'Insufficient permissions' unless allowed? raise PermissionsError, 'Insufficient permissions' unless allowed?
find_or_create_by!(url) DastSite.find_or_create_by!(project: project, url: url) # rubocop:disable CodeReuse/ActiveRecord
end end
private private
...@@ -15,9 +15,5 @@ module DastSites ...@@ -15,9 +15,5 @@ module DastSites
def allowed? def allowed?
Ability.allowed?(current_user, :create_on_demand_dast_scan, project) Ability.allowed?(current_user, :create_on_demand_dast_scan, project)
end end
def find_or_create_by!(url)
DastSite.safe_find_or_create_by!(project: project, url: url)
end
end end
end end
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