Actions
Bug #19417
closedkeep_params throws error if params don't contain top level hash
Description
This can be reproduced in discovery by trying to provision a host and selecting an architecture
| NoMethodError (undefined method `has_key?' for nil:NilClass): | app/controllers/concerns/foreman/controller/parameters/keep_param.rb:11:in `block in keep_param' | app/controllers/concerns/foreman/controller/parameters/keep_param.rb:10:in `each' | app/controllers/concerns/foreman/controller/parameters/keep_param.rb:10:in `inject' | app/controllers/concerns/foreman/controller/parameters/keep_param.rb:10:in `keep_param' | app/controllers/concerns/foreman/controller/parameters/host.rb:34:in `host_params' | app/controllers/concerns/foreman/controller/host_details.rb:58:in `item_params' | app/controllers/concerns/foreman/controller/host_details.rb:50:in `block in assign_parameter' | app/models/taxonomy.rb:72:in `block (2 levels) in as_taxonomy' | app/models/concerns/foreman/thread_session.rb:150:in `as_location' | app/models/taxonomy.rb:71:in `block in as_taxonomy' | app/models/concerns/foreman/thread_session.rb:115:in `as_org' | app/models/taxonomy.rb:70:in `as_taxonomy' | app/controllers/concerns/foreman/controller/host_details.rb:49:in `assign_parameter' | app/controllers/concerns/foreman/controller/host_details.rb:8:in `architecture_selected' | app/controllers/concerns/application_shared.rb:15:in `set_timezone' | app/models/concerns/foreman/thread_session.rb:32:in `clear_thread' | app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller' | lib/middleware/catch_json_parse_errors.rb:8:in `call' | lib/middleware/tagged_logging.rb:18:in `call' |
Actions