diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 23a4db637..88a3e2b6a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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' diff --git a/app/models/query.rb b/app/models/query.rb index 19db899d8..fe0cada37 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -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