mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/models/query.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18833 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
790d2bae70
commit
48b2c8bc36
@ -1143,7 +1143,6 @@ Style/ParallelAssignment:
|
|||||||
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
||||||
Style/ParenthesesAroundCondition:
|
Style/ParenthesesAroundCondition:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/models/query.rb'
|
|
||||||
- 'app/models/repository/subversion.rb'
|
- 'app/models/repository/subversion.rb'
|
||||||
- 'app/models/time_entry.rb'
|
- 'app/models/time_entry.rb'
|
||||||
- 'app/models/wiki_page.rb'
|
- 'app/models/wiki_page.rb'
|
||||||
|
|||||||
@ -1171,7 +1171,7 @@ class Query < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
when "!*"
|
when "!*"
|
||||||
sql = "#{db_table}.#{db_field} IS NULL"
|
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 "*"
|
when "*"
|
||||||
sql = "#{db_table}.#{db_field} IS NOT NULL"
|
sql = "#{db_table}.#{db_field} IS NOT NULL"
|
||||||
sql += " AND #{db_table}.#{db_field} <> ''" if is_custom_filter
|
sql += " AND #{db_table}.#{db_field} <> ''" if is_custom_filter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user