Skip to content

Commit

Permalink
nix the all_vm_or_templates callers
Browse files Browse the repository at this point in the history
fixes `ManageIQ::Providers::Google::CloudManager Inst Including Associations (0.1ms - 1rows)
[----] F, [2020-06-17T13:58:28.726000 #394303:ae790] FATAL -- : Error caught: [NoMethodError] undefined method 'all_vms_and_templates'` from ManageIQ/manageiq#20284

broken in ManageIQ/manageiq#20149
  • Loading branch information
d-m-u committed Jun 17, 2020
1 parent 67e4ffd commit 6b38524
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ def get_view_pages(dbname, view)

def get_db_view(db, options = {})
if %w[ManageIQ_Providers_InfraManager_Template ManageIQ_Providers_InfraManager_Vm]
.include?(db) && options[:association] == "all_vms_and_templates"
.include?(db) && options[:association] == "vms_and_templates"
options[:association] = nil
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/vm_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ def list_child_vms(model, node_id, title, show_list)
end
else
rec = TreeBuilder.get_model_for_prefix(@nodetype).constantize.find(node_id)
options[:association] = @nodetype == 'az' ? 'vms' : 'all_vms_and_templates'
options[:association] = @nodetype == 'az' ? 'vms' : 'vms_and_templates'
options[:parent] = rec
options[:named_scope] << :active

Expand Down

0 comments on commit 6b38524

Please sign in to comment.