From e46ef6231d580164f6872b4d11aa2fd3f65cc900 Mon Sep 17 00:00:00 2001 From: roll Date: Fri, 28 Jun 2019 15:07:30 +0300 Subject: [PATCH] Updated float to decimal conversion --- tableschema/types/number.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tableschema/types/number.py b/tableschema/types/number.py index 5558daf..264fd0c 100644 --- a/tableschema/types/number.py +++ b/tableschema/types/number.py @@ -26,6 +26,8 @@ def cast_number(format, value, **options): elif not isinstance(value, six.integer_types + (float,)): return ERROR try: + if isinstance(value, float): + value = str(value) value = Decimal(value) except Exception: return ERROR