Skip to content

Commit

Permalink
No comments so... fixed #1532.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2560 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jkocherhans committed Mar 24, 2006
1 parent 69c76d7 commit e433f47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/db/models/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit e433f47

Please sign in to comment.