Skip to content

Commit

Permalink
Remove setting the default filters.
Browse files Browse the repository at this point in the history
Remove setting the default filters which is not really needed and it will only cause issues for provision requests made through automate or REST

https://bugzilla.redhat.com/show_bug.cgi?id=1350115
  • Loading branch information
lfu committed Jul 21, 2016
1 parent 831f831 commit e7e75fd
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions app/models/miq_provision_virt_workflow.rb
Expand Up @@ -306,21 +306,6 @@ def update_field_read_only(options = {})
fields(:hardware) { |fn, f, _dn, _d| f[:read_only] = true if options[:read_only_fields].include?(fn) }
end

def set_default_values
super
set_default_filters
end

def set_default_filters
[[:requester, :vm_filter, :Vm], [:environment, :host_filter, :Host], [:environment, :ds_filter, :Storage], [:environment, :cluster_filter, :EmsCluster]].each do |dialog, field, model|
filter = @dialogs.fetch_path(:dialogs, dialog, :fields, field)
unless filter.nil?
current_filter = get_value(@values[field])
filter[:default] = current_filter.nil? ? @requester.settings.fetch_path(:default_search, model) : current_filter
end
end
end

#
# Methods for populating lists of allowed values for a field
# => Input - A hash containing options specific to the called method
Expand Down

0 comments on commit e7e75fd

Please sign in to comment.