summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/operations.py
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2017-04-10 22:26:26 +0500
committerTim Graham <timograham@gmail.com>2017-04-10 13:26:26 -0400
commite7afef13f594eb667f2709c0ef7bca98452ab32b (patch)
treef9c50366cb2a015dacaf44a70cb0e0c4f70717f6 /django/db/backends/mysql/operations.py
parent64264c9a19b7dae6cd1d5e112177cdbcafafc93c (diff)
downloaddjango-e7afef13f594eb667f2709c0ef7bca98452ab32b.tar.gz
Fixed #26788 -- Fixed QuerySet.update() crash when updating a geometry to another one.
Diffstat (limited to 'django/db/backends/mysql/operations.py')
-rw-r--r--django/db/backends/mysql/operations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/mysql/operations.py b/django/db/backends/mysql/operations.py
index b47136df26..c1d0451a54 100644
--- a/django/db/backends/mysql/operations.py
+++ b/django/db/backends/mysql/operations.py
@@ -233,7 +233,7 @@ class DatabaseOperations(BaseDatabaseOperations):
return value
def binary_placeholder_sql(self, value):
- return '_binary %s' if value is not None else '%s'
+ return '_binary %s' if value is not None and not hasattr(value, 'as_sql') else '%s'
def subtract_temporals(self, internal_type, lhs, rhs):
lhs_sql, lhs_params = lhs