BigW Consortium Gitlab

Commit 2ccbe4fd by Kamil Trzciński Committed by Dylan Griffith

Run `Ci::Runner#assign_to` in transaction

parent bf74e69e
......@@ -120,8 +120,15 @@ module Ci
raise ArgumentError, 'Transitioning a group runner to a project runner is not supported'
end
begin
transaction do
self.projects << project
self.save
self.save!
end
rescue ActiveRecord::RecordInvalid => e
self.errors.add(:assign_to, e.message)
false
end
end
def display_name
......
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