Commit 3db4d52b authored by Julien Cristau's avatar Julien Cristau
Browse files

Handle absence of rdef.coord_dimension in pg_geometry_sqltype

Fixes crash on python3 due to NoneType/int comparison.
parent 5f34e6491b6c
......@@ -27,7 +27,7 @@ def pg_geometry_sqltype(rdef):
and coord_dimension.
target_geom_type = rdef.geom_type
if rdef.coord_dimension >= 3: # XXX: handle 2D+M
if rdef.coord_dimension is not None and rdef.coord_dimension >= 3: # XXX: handle 2D+M
target_geom_type += 'Z'
if rdef.coord_dimension == 4:
target_geom_type += 'M'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment