From 54c81a1c936f3682e3405d6737958fdffa39bed9 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sun, 23 Sep 2012 22:49:22 +0200 Subject: [PATCH] [py3] Allowed bytes in get_prep_value for a Geometry --- django/contrib/gis/db/models/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/gis/db/models/fields.py b/django/contrib/gis/db/models/fields.py index 17630d0899..c8b8901d59 100644 --- a/django/contrib/gis/db/models/fields.py +++ b/django/contrib/gis/db/models/fields.py @@ -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: