mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #22550 -- Prohibited QuerySet.last()/reverse() after slicing.
This commit is contained in:
committed by
Tim Graham
parent
84fb50df67
commit
eee34ef64c
@@ -731,10 +731,10 @@ class Queries1Tests(TestCase):
|
||||
q.extra(select={'foo': "1"}),
|
||||
[]
|
||||
)
|
||||
self.assertQuerysetEqual(q.reverse(), [])
|
||||
q.query.low_mark = 1
|
||||
with self.assertRaisesMessage(AssertionError, 'Cannot change a query once a slice has been taken'):
|
||||
q.extra(select={'foo': "1"})
|
||||
self.assertQuerysetEqual(q.reverse(), [])
|
||||
self.assertQuerysetEqual(q.defer('meal'), [])
|
||||
self.assertQuerysetEqual(q.only('meal'), [])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user