#28897: QuerySet.update() raises FieldError on queryset ordered by an annotated
field.
-------------------------------------+-------------------------------------
Reporter: Colton Hicks | Owner: David
| Wobrock
Type: Bug | Status: assigned
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: Admin Interface, | Triage Stage: Accepted
Custom Action, Annotated Field, |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by David Wobrock):
* cc: David Wobrock (added)
* owner: nobody => David Wobrock
* has_patch: 0 => 1
* status: new => assigned
Comment:
The suggested code seems to fix it indeed :)
I could only reproduce when annotating/ordering on a ManyToManyField.
I used the snippet that keeps some `order_by` and doesn't clear it
entirely ¯\_(ツ)_/¯
[https://github.com/django/django/pull/15747 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28897#comment:11>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701811aa4cf46-bb10229e-454c-4d11-a2ac-aecab7125a3c-000000%40eu-central-1.amazonses.com.