Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

No comments so... fixed #1532.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2560 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e433f4797b13c568deec7816020a49fccf652f76 1 parent 69c76d7
@jkocherhans jkocherhans authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/query.py
View
4 django/db/models/query.py
@@ -314,7 +314,7 @@ def extra(self, select=None, where=None, params=None, tables=None):
assert self._limit is None and self._offset is None, \
"Cannot change a query once a slice has been taken"
clone = self._clone()
- if select: clone._select.extend(select)
+ if select: clone._select.update(select)
if where: clone._where.extend(where)
if params: clone._params.extend(params)
if tables: clone._tables.extend(tables)
@@ -386,7 +386,7 @@ def _get_sql_clause(self):
# Add any additional SELECTs.
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.
sql = [" FROM", backend.quote_name(opts.db_table)]
Please sign in to comment.
Something went wrong with that request. Please try again.