Skip to content

Commit

Permalink
Updated float to decimal conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
roll committed Jun 28, 2019
1 parent 19a9de0 commit e46ef62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tableschema/types/number.py
Expand Up @@ -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
Expand Down

0 comments on commit e46ef62

Please sign in to comment.