mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #22550 -- Prohibited QuerySet.last()/reverse() after slicing.
This commit is contained in:
parent
84fb50df67
commit
eee34ef64c
5 changed files with 26 additions and 1 deletions
|
@ -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'), [])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue