mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	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:
		| @@ -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): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user