mirror of
https://github.com/django/django.git
synced 2025-07-06 10:49:17 +00:00
queryset-refactor: Changed execute_sql() to not return an iterator in the
non-MULTI cases when there is an empty result set. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7b9732a4a4
commit
4ea96c0468
@ -988,7 +988,10 @@ class Query(object):
|
||||
try:
|
||||
sql, params = self.as_sql()
|
||||
except EmptyResultSet:
|
||||
raise StopIteration
|
||||
if result_type == MULTI:
|
||||
raise StopIteration
|
||||
else:
|
||||
return
|
||||
|
||||
cursor = self.connection.cursor()
|
||||
cursor.execute(sql, params)
|
||||
|
Loading…
x
Reference in New Issue
Block a user