#30501 closed Bug (fixed)
Queryset ordering and Meta.ordering are mutable on expressions with reverse().
Reported by: | Mariusz Felisiak | Owned by: | Mariusz Felisiak |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Queryset order and Meta.ordering
are mutable with reverse()
.
Bug revealed by running ./runtests.py ordering.test --reverse
(reproduced at a2c31e12da272acc76f3a3a0157fae9a7f6477ac).
It seems that test added in f218a2ff455b5f7391dd38038994f2c5f8b0eca1 wasn't correct because order mutates on queryset execution in SQLCompiler.get_order_by().
Attachments (1)
Change History (6)
by , 5 years ago
Attachment: | 30501.diff added |
---|
comment:2 by , 5 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Tests.