Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[py3] Allowed bytes in get_prep_value for a Geometry

  • Loading branch information...
commit 54c81a1c936f3682e3405d6737958fdffa39bed9 1 parent 43c7f8c
@claudep claudep authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/gis/db/models/fields.py
View
2  django/contrib/gis/db/models/fields.py
@@ -160,7 +160,7 @@ def get_prep_value(self, value):
# 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:

0 comments on commit 54c81a1

Please sign in to comment.
Something went wrong with that request. Please try again.