diff options
Diffstat (limited to 'django/db/backends/mysql/compiler.py')
-rw-r--r-- | django/db/backends/mysql/compiler.py | 3 |
1 files changed, 2 insertions, 1 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 |