diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-07-22 07:37:09 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-07-22 07:37:09 +0000 |
| commit | 83e97ecf885676f29170ee036ca210d28dfe19fb (patch) | |
| tree | bb92dd001c9cf0834cb418697fb48d6dd2d489f7 /django/db/models/sql | |
| parent | 0e9587fd6b180d0a752ae77d3adb5e7966cb65b4 (diff) | |
Fixed #7791 -- Fixed a really silly error I introduced in [7926]. :-(
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/query.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 9639ff4956..ce3b49cd42 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1616,8 +1616,9 @@ class Query(object): if self.ordering_aliases: result = order_modified_iter(cursor, len(self.ordering_aliases), self.connection.features.empty_fetchmany_value) - result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)), - self.connection.features.empty_fetchmany_value) + else: + result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)), + self.connection.features.empty_fetchmany_value) if not self.connection.features.can_use_chunked_reads: # If we are using non-chunked reads, we return the same data # structure as normally, but ensure it is all read into memory |
