From 12472b6553e29dc5e19be36d949ab02d634e0cb0 Mon Sep 17 00:00:00 2001 From: Federico Frenguelli Date: Thu, 17 Oct 2013 15:16:16 +0200 Subject: [PATCH] Fixed precision when converting amount convert_money --- djmoney_rates/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djmoney_rates/utils.py b/djmoney_rates/utils.py index c5de05d..fb0e1b9 100644 --- a/djmoney_rates/utils.py +++ b/djmoney_rates/utils.py @@ -43,6 +43,6 @@ def convert_money(amount, currency_from, currency_to): currency_to, source.name)) if isinstance(amount, float): - amount = Decimal(amount).quantize(rate_from) + amount = Decimal(amount).quantize(Decimal('.000001')) return (amount / rate_from) * rate_to