#32068: Raise a descriptive error on get() with filters operation following
QuerySet.union(), intersection(), and difference().
-------------------------------------+-------------------------------------
     Reporter:  Timo Ludwig          |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  3.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  queryset,            |             Triage Stage:  Accepted
  difference                         |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * cc: Hasan Ramezani (added)
 * type:  Bug => Cleanup/optimization
 * easy:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 `get()` with filters is unsupported, see
 [https://docs.djangoproject.com/en/stable/ref/models/querysets/#union
 documentation]:

 > In addition, only LIMIT, OFFSET, COUNT(*), ORDER BY, and specifying
 columns (i.e. slicing, count(), order_by(), and values()/values_list())
 are allowed on the resulting QuerySet.

 but I agree that we should raise a descriptive error for `get(...)` (see
 related #27995, #31148).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32068#comment:1>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/068.f0b765bc07f2817e91267fa8dff816bb%40djangoproject.com.

Reply via email to