diff --git a/E01_StabRegister/E01_StabRegister_Source.py b/E01_StabRegister/E01_StabRegister_Source.py index c8e5d9261..70bb98bb7 100644 --- a/E01_StabRegister/E01_StabRegister_Source.py +++ b/E01_StabRegister/E01_StabRegister_Source.py @@ -71,7 +71,7 @@ def db_snapshot(root: Path) -> dict[str, Any]: def _cross_rows(root: Path) -> list[dict[str, Any]]: rows = [row for row in db_snapshot(root)["cross_sections"] if row["chainage_m"] is not None] - return sorted(rows, key=lambda row: (float(row["chainage_m"]), row["sequence_num"] or 0)) + return sorted(rows, key=lambda row: (float(row["chainage_m"]), row.get("sequence_num") or 0)) def _row_data(row: dict[str, Any]) -> dict[str, Any]: