Skip to content

Commit

Permalink
Handle empty str in amount as 0
Browse files Browse the repository at this point in the history
Prevents Decimal Conversion error
  • Loading branch information
saravanabalagi committed Jul 20, 2023
1 parent 81a1801 commit c3961ea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -431,4 +431,4 @@ def _parse_decimal(self, value, mapping):
thousands, decimal = mapping._get_float_separators()
value = value.replace(thousands, "")
value = value.replace(decimal, ".")
return Decimal(value)
return Decimal(value or 0)

0 comments on commit c3961ea

Please sign in to comment.