rate: Make sure to parse ints as Decimal objects too.
This commit is contained in:
parent
ec3b9e83f8
commit
5b7f2b92a1
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ class Rate:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_json_file(cls, json_file):
|
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)
|
return cls(**response)
|
||||||
|
|
||||||
def convert(self, amount, from_currency, to_currency):
|
def convert(self, amount, from_currency, to_currency):
|
||||||
|
|
Loading…
Reference in a new issue