Skip to content

Commit

Permalink
set the entity in chargeback to consumption.resource only if it hasnt…
Browse files Browse the repository at this point in the history
… been set by the particular chargeback
  • Loading branch information
Ari Zellner committed Mar 20, 2017
1 parent a143dcd commit b580851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/chargeback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def initialize(options, consumption)
self.start_date, self.end_date, self.display_range = options.report_step_range(consumption.timestamp)
self.interval_name = options.interval
self.chargeback_rates = ''
self.entity = consumption.resource
self.entity ||= consumption.resource
end

def calculate_costs(consumption, rates)
Expand Down

0 comments on commit b580851

Please sign in to comment.