Bug #2001
closedChanging Loc or Org after compute resource selection give 500 error
Description
If I select an initial Location and Org :
it filters what compute resources are available.
If I select one compute resource and then change location
and pick one wich does not contains the selected cr,
I get a 500 and compute resources not refreshed.
Rendered hosts/_compute.html.erb (1.9ms)
Rendered hosts/_unattended.html.erb (4.3ms)
Rendered hosts/_form.html.erb (194.2ms)
Setting current location thread-local variable to none
Setting current organization thread-local variable to none
Operation FAILED: undefined method `new_vm' for nil:NilClass
/opt/foreman/app/models/orchestration/compute.rb:23:in `compute_object'
/opt/foreman/app/views/hosts/_compute.html.erb:1:in `_app_views_hosts__compute_html_erb___1539370346_70368586664280_5599436'
/opt/foreman/vendor/ruby/1.8/gems/actionpack-3.0.17/lib/action_view/template.rb:135:in `send'
/opt/foreman/vendor/ruby/1.8/gems/actionpack-3.0.17/lib/action_view/template.rb:135:in `render'
/opt/foreman/vendor/ruby/1.8/gems/activesupport-3.0.17/lib/active_support/notifications.rb:54:in `ins