修改bug

This commit is contained in:
sylor_huang@126.com
2020-03-27 16:49:08 +08:00
parent 38794cd2d3
commit c78508dfd6
10 changed files with 129109 additions and 10 deletions

View File

@@ -100,7 +100,7 @@ class Project < ApplicationRecord
end
def self.list_user_projects(user_id)
user_not_show = Project.joins(:members).where("projects.is_public = ? and (projects.user_id != ? or members.user_id != ?)", false, user_id,user_id).pluck(:id).uniq
user_not_show = Project.joins(:members).where("projects.is_public = ? and projects.user_id != ? and members.user_id != ?", false, user_id,user_id).pluck(:id).uniq
Project.where.not(id: user_not_show)
end