Skip to content

Commit

Permalink
Merge pull request #13904 from lpichler/use_eager_load_for_extra_reso…
Browse files Browse the repository at this point in the history
…urces

Use eager_load for extra_resources
  • Loading branch information
gtanzillo committed Feb 14, 2017
2 parents 081de28 + f847d82 commit 8ca69c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/chargeback_vm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def self.where_clause(records, options)
def self.extra_resources_without_rollups
# support hyper-v for which we do not collect metrics yet
scope = ManageIQ::Providers::Microsoft::InfraManager::Vm
scope = scope.eager_load(:hardware, :taggings, :tags, :host, :ems_cluster, :storage, :ext_management_system,
:tenant)
if @options[:tag] && (@report_user.nil? || !@report_user.self_service?)
scope.find_tagged_with(:any => @options[:tag], :ns => '*')
else
Expand Down

0 comments on commit 8ca69c6

Please sign in to comment.