Bug #19590
openError when removing primary, provision and managed flag from host with single interface
Description
When editing an existing host and removing the primary, managed and provision flags from the single interface and then saving the host yield the following error:
NoMethodError (undefined method `changed?' for nil:NilClass):
17:30:04 rails.1 | | app/models/host/managed.rb:970:in `trigger_nic_orchestration'
17:30:04 rails.1 | | app/models/concerns/orchestration.rb:86:in `valid?'
17:30:04 rails.1 | | app/models/concerns/foreman/sti.rb:29:in `save_with_type'
17:30:04 rails.1 | | app/controllers/hosts_controller.rb:122:in `block in update'
17:30:04 rails.1 | | app/models/taxonomy.rb:65:in `block in no_taxonomy_scope'
17:30:04 rails.1 | | app/models/taxonomy.rb:72:in `block (2 levels) in as_taxonomy'
17:30:04 rails.1 | | app/models/concerns/foreman/thread_session.rb:150:in `as_location'
17:30:04 rails.1 | | app/models/taxonomy.rb:71:in `block in as_taxonomy'
17:30:04 rails.1 | | app/models/concerns/foreman/thread_session.rb:115:in `as_org'
17:30:04 rails.1 | | app/models/taxonomy.rb:70:in `as_taxonomy'
17:30:04 rails.1 | | app/models/taxonomy.rb:64:in `no_taxonomy_scope'
17:30:04 rails.1 | | app/controllers/hosts_controller.rb:119:in `update'
17:30:04 rails.1 | | app/controllers/concerns/application_shared.rb:15:in `set_timezone'
17:30:04 rails.1 | | app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
17:30:04 rails.1 | | app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
17:30:04 rails.1 | | lib/middleware/catch_json_parse_errors.rb:8:in `call'
17:30:04 rails.1 | | lib/middleware/tagged_logging.rb:18:in `call'
No data to display