Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14285 closed (invalid)

Calling reverse() on order_by('a', 'b') produces order_by('-a')

Reported by: Martin Tsachev Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords: reverse order_by multiple columns
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you have order_by for more than one column reverse() will use only the first one to generate the reverse query.

Example:

Calling reverse() on order_by('a', 'b') produces order_by('-a')

Expected:

order_by('-a', '-b')

Change History (2)

comment:1 by Martin Tsachev, 14 years ago

Resolution: invalid
Status: newclosed

comment:2 by Martin Tsachev, 14 years ago

I used a Manager for order_by() instead of Meta.ordering.

Note: See TracTickets for help on using tickets.
Back to Top