]> source.dussan.org Git - redmine.git/commitdiff
Merged r19563 from trunk to 4.1-stable (#33083).
authorGo MAEDA <maeda@farend.jp>
Sat, 7 Mar 2020 07:53:23 +0000 (07:53 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 7 Mar 2020 07:53:23 +0000 (07:53 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19564 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/query.rb

index a3061e2defc3ed0dae50883529b8adc80a474a2b..36c93882071090ecd12e4f9482d4e35176299141 100644 (file)
@@ -914,7 +914,7 @@ class Query < ActiveRecord::Base
         end
       end
 
-      if field == 'project_id' || (self.type == 'ProjectQuery' && (field == 'id' || field == 'parent_id'))
+      if field == 'project_id' || (self.type == 'ProjectQuery' && %w[id parent_id].include?(field))
         if v.delete('mine')
           v += User.current.memberships.map(&:project_id).map(&:to_s)
         end