解绑时先判断是否是trustie提供服务器的场景

This commit is contained in:
moshenglv 2021-01-06 16:45:18 +08:00
parent cbe5b3afde
commit 06b8aab455
1 changed files with 6 additions and 4 deletions

View File

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