Merge pull request '解绑流程修改' (#9) from trustie_server into develop

Reviewed-on: https://git.trustie.net/jasder/forgeplus/pulls/9
This commit is contained in:
jasder 2021-01-06 16:53:22 +08:00
commit 5cdfc4ba62
1 changed files with 6 additions and 4 deletions

View File

@ -96,12 +96,14 @@ class Ci::CloudAccountsController < Ci::BaseController
def unbind def unbind
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
unbind_account! if current_user.ci_cloud_account.server_type == Ci::CloudAccount::SERVER_TYPE_TRUSTIE
if @repos if @repos
@repos.each do |repo| @repos.each do |repo|
repo.deactivate! repo.deactivate!
end
end end
end end
unbind_account!
render_ok render_ok
end end
rescue Exception => ex rescue Exception => ex