Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 904084611d740e26eb3cb44af9a3d2f3a6d1b665 1 parent 90a6c3a
Anssi Kääriäinen akaariai authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 tests/queries/tests.py
7 tests/queries/tests.py
View
@@ -2504,6 +2504,13 @@ def test_iter_exceptions(self):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.