1
0
mirror of https://github.com/django/django.git synced 2025-07-05 18:29:11 +00:00

No comments so... fixed #1532.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2560 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans 2006-03-24 21:52:39 +00:00
parent 69c76d7e08
commit e433f4797b

View File

@ -314,7 +314,7 @@ class QuerySet(object):
assert self._limit is None and self._offset is None, \ assert self._limit is None and self._offset is None, \
"Cannot change a query once a slice has been taken" "Cannot change a query once a slice has been taken"
clone = self._clone() clone = self._clone()
if select: clone._select.extend(select) if select: clone._select.update(select)
if where: clone._where.extend(where) if where: clone._where.extend(where)
if params: clone._params.extend(params) if params: clone._params.extend(params)
if tables: clone._tables.extend(tables) if tables: clone._tables.extend(tables)
@ -386,7 +386,7 @@ class QuerySet(object):
# Add any additional SELECTs. # Add any additional SELECTs.
if self._select: if self._select:
select.extend(['(%s) AS %s' % (quote_only_if_word(s[1]), backend.quote_name(s[0])) for s in self._select]) select.extend(['(%s) AS %s' % (quote_only_if_word(s[1]), backend.quote_name(s[0])) for s in self._select.items()])
# Start composing the body of the SQL statement. # Start composing the body of the SQL statement.
sql = [" FROM", backend.quote_name(opts.db_table)] sql = [" FROM", backend.quote_name(opts.db_table)]