Opened 5 years ago

Closed 5 years ago

#31227 closed Bug (invalid)

Doing filter() or exclude() after an intersection().

Reported by: acomanda Owned by: nobody
Component: Database layer (models, ORM) Version: 3.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In the 2.2.x version it was possible to do first an intersection and after that a filter or exclude on the resulting query set.
Now it leeds to an error.
The error says
django.db.utils.NotSupportedError: Calling QuerySet.filter() after intersection() is not supported.

Change History (1)

comment:1 by Mariusz Felisiak, 5 years ago

Resolution: invalid
Severity: Release blockerNormal
Status: newclosed
Summary: Doing filter or exclude after an intersectionDoing filter() or exclude() after an intersection().

Yes it was possible to call QuerySet.filter()/exclude() after QuerySet.intersection()/union()/difference() but these calls were ignored, i.e. they didn't affect combined queries. That's why we decided to raise a descriptive error (see #27995).

Note: See TracTickets for help on using tickets.
Back to Top