mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Revert "Fixed 19895 -- Made second iteration over invalid queryset raise an exception too"
This reverts commit 2cd0edaa47
.
This commit was the cause of a memory leak. See ticket for more details.
Thanks Anssi Kääriäinen for identifying the source of the bug.
This commit is contained in:
parent
ccb87f97ad
commit
23490a2394
2 changed files with 2 additions and 19 deletions
|
@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|||
from datetime import datetime
|
||||
import threading
|
||||
|
||||
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned, FieldError
|
||||
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
|
||||
from django.db import connections, DEFAULT_DB_ALIAS
|
||||
from django.db.models.fields import Field, FieldDoesNotExist
|
||||
from django.db.models.query import QuerySet, EmptyQuerySet, ValuesListQuerySet
|
||||
|
@ -689,11 +689,6 @@ class ModelTest(TestCase):
|
|||
with self.assertNumQueries(0):
|
||||
self.assertEqual(len(Article.objects.none().distinct('headline', 'pub_date')), 0)
|
||||
|
||||
def test_invalid_qs_list(self):
|
||||
qs = Article.objects.order_by('invalid_column')
|
||||
self.assertRaises(FieldError, list, qs)
|
||||
self.assertRaises(FieldError, list, qs)
|
||||
|
||||
class ConcurrentSaveTests(TransactionTestCase):
|
||||
@skipUnlessDBFeature('test_db_allows_multiple_connections')
|
||||
def test_concurrent_delete_with_save(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue