mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
[py3] Allowed bytes in get_prep_value for a Geometry
This commit is contained in:
@@ -160,7 +160,7 @@ class GeometryField(Field):
|
|||||||
# from the given string input.
|
# from the given string input.
|
||||||
if isinstance(geom, Geometry):
|
if isinstance(geom, Geometry):
|
||||||
pass
|
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:
|
try:
|
||||||
geom = Geometry(geom)
|
geom = Geometry(geom)
|
||||||
except GeometryException:
|
except GeometryException:
|
||||||
|
|||||||
Reference in New Issue
Block a user