Skip to content

Commit 3b231f1

Browse files
authored
Fix CLI with unset geometry_name (#451)
1 parent 566f172 commit 3b231f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lonboard/_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ def read_pyogrio(path: Path) -> pa.Table:
2727
) from e
2828

2929
meta, table = read_arrow(path)
30-
geometry_column_name = meta.get("geometry_name", "wkb_geometry")
30+
# The `geometry_name` key always exists but can be an empty string. In the case of
31+
# an empty string, we want to default to `wkb_geometry`
32+
geometry_column_name = meta.get("geometry_name") or "wkb_geometry"
3133
# TODO: assert there are not two column names of wkb_geometry, nor an existing
3234
# column named "geometry"
3335

0 commit comments

Comments
 (0)