[py3] Allowed bytes in get_prep_value for a Geometry

This commit is contained in:
Claude Paroz 2012-09-23 22:49:22 +02:00
parent 43c7f8c3a3
commit 54c81a1c93
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ class GeometryField(Field):
# from the given string input.
if isinstance(geom, Geometry):
pass
elif isinstance(geom, six.string_types) or hasattr(geom, '__geo_interface__'):
elif isinstance(geom, (bytes, six.string_types)) or hasattr(geom, '__geo_interface__'):
try:
geom = Geometry(geom)
except GeometryException: