Skip to content

Commit

Permalink
refactor: better index handling for postgres get geom types
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Feb 15, 2024
1 parent 57d34de commit c2e2e65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osm_rawdata/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _get_geometry_types(self, config: QueryConfig) -> Union[list, None]:
"""
geometry_types = []
for table, geometry_type in {"nodes": "point", "ways_line": "line", "ways_poly": "polygon"}.items():
if config.config["select"][table] or config.config["where"][table]:
if config.config.get("select", {}).get(table) or config.config.get("where", {}).get(table):
geometry_types.append(geometry_type)
return geometry_types or None

Expand Down

0 comments on commit c2e2e65

Please sign in to comment.