From 5b7f2b92a1f96159f2602309dca723ecbb4958d6 2017-05-18 17:33:32 From: Brett Smith Date: 2017-05-18 17:33:32 Subject: [PATCH] rate: Make sure to parse ints as Decimal objects too. --- diff --git a/oxrlib/rate.py b/oxrlib/rate.py index 9bfef8cdae042672bb25b6024223f3f8416a05a3..c3ad96077c8836f89de6a13b6b7eca8b467bc2f3 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):