Fixed #19895 -- Second iterator over invalid qs raises errors
The fix was already in the patch for #18702, so only test added for ticket #19895.
This commit is contained in:
parent
90a6c3aaf0
commit
904084611d
|
@ -2504,6 +2504,13 @@ class IteratorExceptionsTest(TestCase):
|
|||
with self.assertRaises(AttributeError):
|
||||
list(qs)
|
||||
|
||||
def test_invalid_qs_list(self):
|
||||
# Test for #19895 - second iteration over invalid queryset
|
||||
# raises errors.
|
||||
qs = Article.objects.order_by('invalid_column')
|
||||
self.assertRaises(FieldError, list, qs)
|
||||
self.assertRaises(FieldError, list, qs)
|
||||
|
||||
|
||||
class NullJoinPromotionOrTest(TestCase):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in New Issue