1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

[soc2009/multidb] Updated DateQuery to work correctly with multiple databases

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@10943 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor
2009-06-07 23:56:42 +00:00
parent f57bc92842
commit 1653ffb571
5 changed files with 17 additions and 12 deletions

View File

@@ -729,7 +729,10 @@ class BaseQuery(object):
aliases.add(r)
col_aliases.add(col[1])
else:
result.append(col.as_sql(quote_func=qn))
if getattr(col, 'as_sql_takes_connection', False):
result.append(col.as_sql(qn, self.connection))
else:
result.append(col.as_sql(qn))
if hasattr(col, 'alias'):
aliases.add(col.alias)