From 5b7f2b92a1f96159f2602309dca723ecbb4958d6 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Thu, 18 May 2017 13:33:32 -0400 Subject: [PATCH] rate: Make sure to parse ints as Decimal objects too. --- oxrlib/rate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oxrlib/rate.py b/oxrlib/rate.py index 9bfef8c..c3ad960 100644 --- a/oxrlib/rate.py +++ b/oxrlib/rate.py @@ -45,7 +45,7 @@ class Rate: @classmethod def from_json_file(cls, json_file): - response = json.load(json_file, parse_float=decimal.Decimal) + response = json.load(json_file, parse_int=decimal.Decimal, parse_float=decimal.Decimal) return cls(**response) def convert(self, amount, from_currency, to_currency):