Actions
Patch #29710
closedRemove unused variable 'filter_options' from Query#add_filter
Description
The variable was changed in r86 along with the instance method Query#add_filter.
However, filter_options
is unused.
(In r86, most of the filter_options's processing was comment out.)
I would like to change it as follows.
diff --git a/app/models/query.rb b/app/models/query.rb
index fa5c926ba..2c0f90161 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -613,7 +613,6 @@ class Query < ActiveRecord::Base
return unless values.nil? || values.is_a?(Array)
# check if field is defined as an available filter
if available_filters.has_key? field
- filter_options = available_filters[field]
filters[field] = {:operator => operator, :values => (values || [''])}
end
end
Files
Updated by Go MAEDA about 6 years ago
- Subject changed from Remove unused variable 'filter_options'(Query#add_filter) to Remove unused variable 'filter_options' from Query#add_filter
- Assignee set to Go MAEDA
- Target version changed from 4.1.0 to 4.0.0
Committed. Thank you for detecting and reporting it.
Actions