1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-01 05:09:40 +00:00

fix source indent of app/models/query.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@20039 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2020-09-17 15:48:09 +00:00
parent 1a8c65a79f
commit a62f6cde56

View File

@ -455,9 +455,9 @@ class Query < ActiveRecord::Base
case operator_for(field)
when "=", ">=", "<=", "><"
if values_for(field).detect do |v|
v.present? &&
(!/\A\d{4}-\d{2}-\d{2}(T\d{2}((:)?\d{2}){0,2}(Z|\d{2}:?\d{2})?)?\z/.match?(v) ||
parse_date(v).nil?)
v.present? &&
(!/\A\d{4}-\d{2}-\d{2}(T\d{2}((:)?\d{2}){0,2}(Z|\d{2}:?\d{2})?)?\z/.match?(v) ||
parse_date(v).nil?)
end
add_filter_error(field, :invalid)
end
@ -757,7 +757,7 @@ class Query < ActiveRecord::Base
# preserve the column_names order
cols = (has_default_columns? ? default_columns_names : column_names).collect do |name|
available_columns.find {|col| col.name == name}
available_columns.find {|col| col.name == name}
end.compact
available_columns.select(&:frozen?) | cols
end