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


Ignore:
Timestamp:
Dec 9, 2021, 11:46:31 PM (2 years ago)
Author:
Mariusz Felisiak

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