@@ -108,10 +108,10 class Issue < ActiveRecord::Base | |||
|
108 | 108 | when 'all' |
|
109 | 109 | nil |
|
110 | 110 | when 'default' |
|
111 | user_ids = [user.id] + user.groups.map(&:id) | |
|
111 | user_ids = [user.id] + user.groups.map(&:id).compact | |
|
112 | 112 | "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" |
|
113 | 113 | when 'own' |
|
114 | user_ids = [user.id] + user.groups.map(&:id) | |
|
114 | user_ids = [user.id] + user.groups.map(&:id).compact | |
|
115 | 115 | "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" |
|
116 | 116 | else |
|
117 | 117 | '1=0' |
General Comments 0
You need to be logged in to leave comments.
Login now