Skip to content

Commit

Permalink
Fix: wrong date type in import causes crash (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Dickinson authored Mar 3, 2024
1 parent 0974057 commit 38d22ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/meshdb/utils/spreadsheet_import/csv_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ def get_spreadsheet_rows(
continue

try:
install_date = datetime.datetime.strptime(row["installDate"], "%m/%d/%Y")
install_date = datetime.datetime.strptime(row["installDate"], "%m/%d/%Y").date()
except ValueError:
install_date = None

try:
abandon_date = datetime.datetime.strptime(row["abandonDate"], "%m/%d/%Y")
abandon_date = datetime.datetime.strptime(row["abandonDate"], "%m/%d/%Y").date()
except ValueError:
abandon_date = None

Expand Down

0 comments on commit 38d22ec

Please sign in to comment.