fix: org not need create member

This commit is contained in:
vilet.yy 2021-04-19 11:35:12 +08:00
parent 5a20842edb
commit 1920cb5ce3
1 changed files with 2 additions and 1 deletions

View File

@ -161,7 +161,8 @@ class Project < ApplicationRecord
#创建项目管理员
def check_project_members
unless members.present? && member?(user_id)
return if owner.is_a?(Organization)
unless members.present? && members.exists?(user_id: self.user_id)
member_params = {
user_id: self.user_id,
project_id: self.id