Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
postgis
Commits
35fdd8b24cb9
Commit
3db4d52b
authored
Feb 18, 2016
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
site_cubicweb.py
View file @
35fdd8b2
...
...
@@ -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'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment