]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/models/query.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 15:54:24 +0000 (15:54 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 15:54:24 +0000 (15:54 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18833 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/models/query.rb

index 23a4db637ba2af16d24692c44364d6413089f350..88a3e2b6a474576f408e7218ef734c4503a61f8f 100644 (file)
@@ -1143,7 +1143,6 @@ Style/ParallelAssignment:
 # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
 Style/ParenthesesAroundCondition:
   Exclude:
-    - 'app/models/query.rb'
     - 'app/models/repository/subversion.rb'
     - 'app/models/time_entry.rb'
     - 'app/models/wiki_page.rb'
index 19db899d8a47a1dee04130e8c18ab7b130731544..fe0cada379caae211ac74b37b091e7f49c9289dd 100644 (file)
@@ -1171,7 +1171,7 @@ class Query < ActiveRecord::Base
       end
     when "!*"
       sql = "#{db_table}.#{db_field} IS NULL"
-      sql += " OR #{db_table}.#{db_field} = ''" if (is_custom_filter || [:text, :string].include?(type_for(field)))
+      sql += " OR #{db_table}.#{db_field} = ''" if is_custom_filter || [:text, :string].include?(type_for(field))
     when "*"
       sql = "#{db_table}.#{db_field} IS NOT NULL"
       sql += " AND #{db_table}.#{db_field} <> ''" if is_custom_filter