fix: org not need create member

This commit is contained in:
2021-04-19 11:35:12 +08:00
committed by jasder
parent f0c4d1226b
commit f75827bcf0

View File

@@ -158,7 +158,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