From d5de6aa66b8697b56f7fd4ba00e2bc80e4af1bda Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 8 Sep 2021 18:16:02 +0800 Subject: [PATCH] fix: transfer repository owner complete not include organization --- app/services/projects/apply_transfer_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/projects/apply_transfer_service.rb b/app/services/projects/apply_transfer_service.rb index 0d9d41e7d..2953cd3d2 100644 --- a/app/services/projects/apply_transfer_service.rb +++ b/app/services/projects/apply_transfer_service.rb @@ -24,7 +24,7 @@ class Projects::ApplyTransferService < ApplicationService raise Error, '仓库标识不正确' if @project.identifier != params[:identifier] raise Error, '该仓库正在迁移' if @project.is_transfering raise Error, '新拥有者不存在' unless @owner.present? - raise Error, '新拥有者资料不完善' unless @owner.profile_completed + raise Error, '新拥有者资料不完善' if @owner.is_a?(User) && !@owner.profile_completed raise Error, '新拥有者已经存在同名仓库!' if Project.where(user_id: @owner.id, identifier: params[:identifier]).present? raise Error, '未拥有转移权限' unless is_permit_owner end