]> source.dussan.org Git - redmine.git/commitdiff
Fix a RuboCop offense Style/MultipleComparison (#33083).
authorGo MAEDA <maeda@farend.jp>
Sat, 7 Mar 2020 07:29:14 +0000 (07:29 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 7 Mar 2020 07:29:14 +0000 (07:29 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19563 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/query.rb

index 9e85266451b5aadd7db3dacac95b1e11d6522d77..cefe1a0ef07d6632ecf0ed78417855b75c37fe5a 100644 (file)
@@ -924,7 +924,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