Changeset - 5b7f2b92a1f9
[Not reviewed]
0 1 0
Brett Smith - 7 years ago 2017-05-18 17:33:32
brettcsmith@brettcsmith.org
rate: Make sure to parse ints as Decimal objects too.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
oxrlib/rate.py
Show inline comments
...
 
@@ -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):
0 comments (0 inline, 0 general)