From c759eb3f158ccede33b8cd7d8ae554724ca9fd65 Mon Sep 17 00:00:00 2001 From: Gregg Tanzillo Date: Tue, 18 Jul 2017 08:59:29 -0400 Subject: [PATCH] Merge pull request #15580 from lpichler/fix_chargeback_report_with_unassigned_rates Fix chargeback report with unassigned rates (cherry picked from commit 03df095f53c2aaeffd1307f8cfb9a4803c56a2c8) https://bugzilla.redhat.com/show_bug.cgi?id=1472837 --- app/models/miq_report/formatting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/miq_report/formatting.rb b/app/models/miq_report/formatting.rb index 66b67c5a7ff..2f8fee41ca4 100644 --- a/app/models/miq_report/formatting.rb +++ b/app/models/miq_report/formatting.rb @@ -69,7 +69,7 @@ def format(col, value, options = {}) # Chargeback Reports: Add the selected currency in the assigned rate to options if Chargeback.db_is_chargeback?(db) @rates_cache ||= Chargeback::RatesCache.new - options[:unit] = @rates_cache.currency_for_report + options[:unit] = @rates_cache.currency_for_report if @rates_cache.currency_for_report end format.merge!(options) if format # Merge additional options that were passed in as overrides