Fixed typo in contrib.gis variable name.

This commit is contained in:
HyunTae Hwang 2018-12-17 15:16:00 +09:00 committed by Tim Graham
parent 315357ad25
commit ae2897aaf8
1 changed files with 3 additions and 3 deletions

View File

@ -278,12 +278,12 @@ class PostGISOperations(BaseSpatialOperations, DatabaseOperations):
not in the SRID of the field. Specifically, this routine will
substitute in the ST_Transform() function call.
"""
tranform_func = self.spatial_function_name('Transform')
transform_func = self.spatial_function_name('Transform')
if hasattr(value, 'as_sql'):
if value.field.srid == f.srid:
placeholder = '%s'
else:
placeholder = '%s(%%s, %s)' % (tranform_func, f.srid)
placeholder = '%s(%%s, %s)' % (transform_func, f.srid)
return placeholder
# Get the srid for this object
@ -297,7 +297,7 @@ class PostGISOperations(BaseSpatialOperations, DatabaseOperations):
if value_srid is None or value_srid == f.srid:
placeholder = '%s'
else:
placeholder = '%s(%%s, %s)' % (tranform_func, f.srid)
placeholder = '%s(%%s, %s)' % (transform_func, f.srid)
return placeholder