Skip to content

Commit

Permalink
Avoid N+1 queries by including snapshots
Browse files Browse the repository at this point in the history
Avoid N+1 queries by including snapshots
  • Loading branch information
Ladas committed Feb 9, 2017
1 parent 1ab7103 commit 41a55af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/miq_provision_virt_workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def allowed_templates(options = {})
end
end

MiqPreloader.preload(allowed_templates_list, [:operating_system, :ext_management_system, {:hardware => :disks}])
MiqPreloader.preload(allowed_templates_list, [:snapshots, :operating_system, :ext_management_system, {:hardware => :disks}])
@allowed_templates_cache = allowed_templates_list.collect do |template|
create_hash_struct_from_vm_or_template(template, options)
end
Expand Down

0 comments on commit 41a55af

Please sign in to comment.