Skip to content
Browse files

No comments so... fixed #1532.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 69c76d7 commit e433f4797b13c568deec7816020a49fccf652f76 @jkocherhans jkocherhans committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/
4 django/db/models/
@@ -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)]

0 comments on commit e433f47

Please sign in to comment.
Something went wrong with that request. Please try again.