Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[py3] Allowed bytes in get_prep_value for a Geometry

  • Loading branch information...
commit 54c81a1c936f3682e3405d6737958fdffa39bed9 1 parent 43c7f8c
Claude Paroz authored September 23, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/contrib/gis/db/models/fields.py
2  django/contrib/gis/db/models/fields.py
@@ -160,7 +160,7 @@ def get_prep_value(self, value):
160 160
         # from the given string input.
161 161
         if isinstance(geom, Geometry):
162 162
             pass
163  
-        elif isinstance(geom, six.string_types) or hasattr(geom, '__geo_interface__'):
  163
+        elif isinstance(geom, (bytes, six.string_types)) or hasattr(geom, '__geo_interface__'):
164 164
             try:
165 165
                 geom = Geometry(geom)
166 166
             except GeometryException:

0 notes on commit 54c81a1

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