Skip to content

Commit

Permalink
Fix: crash due to link sheet format change (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Dickinson authored Oct 6, 2024
1 parent 7122e4b commit 678012b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/meshdb/utils/spreadsheet_import/csv_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,17 @@ def get_spreadsheet_links(links_path: str) -> List[SpreadsheetLink]:
except ValueError:
abandon_date = None

try:
from_node_id = int(row["from"])
to_node_id = int(row["to"])
except ValueError:
# If the row does not contain two numbers, we should skip it
continue

links.append(
SpreadsheetLink(
from_node_id=int(row["from"]),
to_node_id=int(row["to"]),
from_node_id=from_node_id,
to_node_id=to_node_id,
status=SpreadsheetLinkStatus(row["status"]),
install_date=install_date,
abandon_date=abandon_date,
Expand Down

0 comments on commit 678012b

Please sign in to comment.