diff options
| author | Nilesh Kumar Pahari <nileshpahari@protonmail.com> | 2026-02-05 17:21:45 -0500 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-02-06 15:45:45 -0500 |
| commit | 087bb9e8f3478d53f12b1737af865992af17c5f2 (patch) | |
| tree | 4fd989d852b7e5ebc0b01ca56c408eb725548aa9 /django/db | |
| parent | 6c2436fa8671cd41c6a5841493142308cd9541c8 (diff) | |
Refs #36644 -- Applied default ordering after union().
Diffstat (limited to 'django/db')
| -rw-r--r-- | django/db/models/query.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py index 5649a83428..afb3aac5cb 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -1679,6 +1679,7 @@ class QuerySet(AltersData): clone = self._chain() # Clear limits and ordering so they can be reapplied clone.query.clear_ordering(force=True) + clone.query.default_ordering = True clone.query.clear_limits() clone.query.combined_queries = (self.query, *(qs.query for qs in other_qs)) clone.query.combinator = combinator |
