Project

General

Profile

Patch #14606 ยป patch_empty_group_id.diff

patch or workaround for the issue - Mattanja Kern, 2013-08-02 23:18

View differences:

app/models/issue.rb (working copy)
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).reject(&:nil?)
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).reject(&:nil?)
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'
    (1-1/1)