From 0a8a8fd72871875b5877aad62f0f6c66bae0e348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Luka=C5=A1=C3=ADk?= Date: Tue, 24 Jan 2017 11:50:11 +0100 Subject: [PATCH] Do not use BigDecimal in euwe Euwe uses ruby 2.3.1 which does not coalesce floats and BigDecimals well. Try for yourself BigDecimal.new(1) <= Float::INFINITY or Float::INFINITY >= BigDecimal.new(1) Fixes #13591. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1416001 --- app/models/chargeback/consumption_without_rollups.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/chargeback/consumption_without_rollups.rb b/app/models/chargeback/consumption_without_rollups.rb index a0c618d4856..282d84fb39e 100644 --- a/app/models/chargeback/consumption_without_rollups.rb +++ b/app/models/chargeback/consumption_without_rollups.rb @@ -50,7 +50,7 @@ def current_value(metric) when 'derived_memory_available' resource.hardware.try(:memory_mb) when 'derived_vm_allocated_disk_storage' - resource.allocated_disk_storage + resource.allocated_disk_storage.try(:to_f) end @value[metric] end