From e72dfa4973d9d964a190d0b6888b6b3065891584 Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 27 Oct 2022 09:28:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=AE=BE=E7=BD=AE=E6=9D=83=E9=99=90=E5=9C=A8?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=8B=A5=E6=9C=89=E8=80=85=E4=B9=8B=E5=90=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/projects/transfer_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/projects/transfer_service.rb b/app/services/projects/transfer_service.rb index 5df5e9f1e..ea16bcf9e 100644 --- a/app/services/projects/transfer_service.rb +++ b/app/services/projects/transfer_service.rb @@ -26,8 +26,8 @@ class Projects::TransferService < ApplicationService def update_owner # 转移项目需要移除原来的权限 project.members.map{|m| m.destroy! if m.user_id == owner.id || project.member(new_owner.id) || (new_owner.is_a?(Organization) && new_owner.is_member?(m.user_id)) } - project.set_owner_permission(new_owner) project.update!(user_id: new_owner.id) + project.set_owner_permission(new_owner) end def update_repo_url