[2.0.x] Simplified GeometryField.select_format().

Backport of e9a370bb6a from master
This commit is contained in:
Sergey Fedoseev 2017-10-29 23:22:26 +05:00 committed by Tim Graham
parent c7b1224914
commit 05232cda2f
2 changed files with 2 additions and 3 deletions

View File

@ -16,7 +16,7 @@ class BaseSpatialOperations:
spatial_version = None
# How the geometry column should be selected.
select = None
select = '%s'
@cached_property
def select_extent(self):

View File

@ -266,8 +266,7 @@ class GeometryField(BaseSpatialField):
of the spatial backend. For example, Oracle and MySQL require custom
selection formats in order to retrieve geometries in OGC WKB.
"""
select = compiler.connection.ops.select
return select % sql if select else sql, params
return compiler.connection.ops.select % sql, params
# The OpenGIS Geometry Type Fields