Skip to content

Commit

Permalink
♻️ Add 'NoneType' as valid currency
Browse files Browse the repository at this point in the history
  • Loading branch information
i-be-snek committed Nov 8, 2024
1 parent 2d140c2 commit 8c844c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Database/scr/normalize_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,8 @@ def validate_currency_monetary_impact(self, row: dict) -> dict:
cols = ["Total_{}_Min", "Total_{}_Max", "Total_{}_Approx", "Total_{}_Unit", "Total_{}_Inflation_Adjusted"]

for category in ["Damage", "Insured_Damage"]:
if row[f"Total_{category}_Unit"] is None:
return row
try:
Currency(row[f"Total_{category}_Unit"])
except ValueError as err:
Expand Down

0 comments on commit 8c844c2

Please sign in to comment.