diff options
| author | Collin Anderson <cmawebsite@gmail.com> | 2014-11-21 11:38:02 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-11-21 16:44:50 -0500 |
| commit | d4ea4eea7995edd75061777fe7223c5871d6938c (patch) | |
| tree | fab2c36b613bfe5beb569758840af7956307c0cf | |
| parent | c7087bc777a078f71a0705d9d0eba51d2679a206 (diff) | |
Fixed #23889 -- Added more usage of quote_name_unless_alias() to avoid deprecation warnings.
| -rw-r--r-- | django/db/backends/mysql/compiler.py | 3 | ||||
| -rw-r--r-- | django/db/models/expressions.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/django/db/backends/mysql/compiler.py b/django/db/backends/mysql/compiler.py index 56bea51add..ef1be1d069 100644 --- a/django/db/backends/mysql/compiler.py +++ b/django/db/backends/mysql/compiler.py @@ -2,7 +2,8 @@ from django.db.models.sql import compiler class SQLCompiler(compiler.SQLCompiler): - def as_subquery_condition(self, alias, columns, qn): + def as_subquery_condition(self, alias, columns, compiler): + qn = compiler.quote_name_unless_alias qn2 = self.connection.ops.quote_name sql, params = self.as_sql() return '(%s) IN (%s)' % (', '.join('%s.%s' % (qn(alias), qn2(column)) for column in columns), sql), params diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index 1d71ecd195..7407d1c40b 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -521,7 +521,7 @@ class Ref(ExpressionNode): return self def as_sql(self, compiler, connection): - return "%s" % compiler(self.refs), [] + return "%s" % compiler.quote_name_unless_alias(self.refs), [] def get_group_by_cols(self): return [(None, self.refs)] |
