Changes between Version 1 and Version 2 of Ticket #28897, comment 6


Ignore:
Timestamp:
12/10/21 05:46:31 (12 months ago)
Author:
Mariusz Felisiak
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28897, comment 6

    v1 v2  
    11Thanks for details! `QuerySet.update()` removes all annotations (see a84344bc539c66589c8d4fe30c6ceaecf8ba1af3) that's why `order_by()` raises a `FieldError`. We should probably clear ordering in `QuerySet.update()` or at least remove all annotated fields from it, e.g.
    2 {{{
     2{{{#!diff
    33diff --git a/django/db/models/query.py b/django/db/models/query.py
    44index fb6639793a..1db9de0b5c 100644
Back to Top