#36388: QuerySet.union no longer supports empty args
-------------------------------------+-------------------------------------
Reporter: Antoine Humeau | Owner: Colleen
| Dunlap
Type: Bug | Status: assigned
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
It should point at `main` which your new PR does, thank you for that.
Please have a look at
[https://github.com/django/django/pull/19471#discussion_r2091852049 this
comment]. The fact the tests are passing is not a good indicative that the
right thing is happening here as the adjusted test I provided demonstrates
(it does a `UNION` against itself which is not safe when `all` is used).
I still believe that the right way of fixing this is to adjust
`QuerySet.union` to return `self` when `not other_qs`.
--
Ticket URL: <https://code.djangoproject.com/ticket/36388#comment:10>
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 visit
https://groups.google.com/d/msgid/django-updates/01070196d5857ba7-6748767d-5695-49e8-9d6d-fe96cc996102-000000%40eu-central-1.amazonses.com.