#28722: reverse_ordering does not reverse nulls_first/nulls_last
-------------------------------------+-------------------------------------
Reporter: Tomer | Owner: Tomer Chachamu
Chachamu |
Type: Bug | Status: assigned
Component: Database | Version: 1.11
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
The documentation for Expression.reverse_ordering says it is its own
inverse:
https://docs.djangoproject.com/en/1.11/ref/models/expressions/#django.db.models.Expression.reverse_ordering
> Returns self with any modifications required to reverse the sort order
within an order_by call. As an example, an expression implementing NULLS
LAST would change its value to be NULLS FIRST. Modifications are only
required for expressions that implement sort order like OrderBy. This
method is called when reverse() is called on a queryset.
However, this isn't implemented.
https://github.com/django/django/blob/2b5a511bd9fbd67cedf72b8d39b9522c0140d023/django/db/models/expressions.py#L1133
--
Ticket URL: <https://code.djangoproject.com/ticket/28722>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.3ef3c6cf54a2c34acc01e2506822101f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.