#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):

 No, the branch you linked is gated by a `if isinstance(self,
 EmptyQuerySet)` and `qs` is a list of all non-empty querysets. Django is
 able to detect when a queryset cannot match any rows (the most common
 example is `filter(pk=[])`) and the logic you linked deals with this case.

 What I mean is that if the `*other_qs` args capture is empty then you can
 immediately return as `some_set OR not other set` means `some_set`.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36388#comment:13>
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/01070196d590ce18-b1d7b101-e744-460c-b92e-cefce872502f-000000%40eu-central-1.amazonses.com.

Reply via email to