Browse files

[py3] Allowed bytes in get_prep_value for a Geometry

  • Loading branch information...
1 parent 43c7f8c commit 54c81a1c936f3682e3405d6737958fdffa39bed9 @claudep claudep committed Sep 23, 2012
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.