Opened 22 months ago
Closed 17 months ago
#34362 closed Bug (fixed)
FilteredRelation doesn’t support conditional expression
Reported by: | zhu | Owned by: | Francesco Panico |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 4.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
def test_conditional_expression(self): self.assertSequenceEqual( Author.objects.annotate( the_book=FilteredRelation( "book", condition=Q( Value(False) ), ), ) .filter( the_book__isnull=False, ), [], )
Change History (16)
comment:1 by , 22 months ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
comment:2 by , 22 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 22 months ago
Has patch: | set |
---|
comment:4 by , 22 months ago
Patch needs improvement: | set |
---|
comment:6 by , 22 months ago
Needs tests: | set |
---|---|
Patch needs improvement: | set |
Adding Needs tests and Patch needs improvement after zhu's comment.
comment:7 by , 22 months ago
Needs tests: | unset |
---|---|
Patch needs improvement: | unset |
comment:8 by , 21 months ago
Needs tests: | set |
---|---|
Patch needs improvement: | set |
comment:9 by , 20 months ago
Needs tests: | unset |
---|---|
Patch needs improvement: | unset |
comment:10 by , 20 months ago
Patch needs improvement: | set |
---|
We should first fix #33766 so we don't end with an error prone solution.
comment:11 by , 17 months ago
Patch needs improvement: | unset |
---|
comment:13 by , 17 months ago
Patch needs improvement: | set |
---|
comment:14 by , 17 months ago
Patch needs improvement: | unset |
---|
comment:15 by , 17 months ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
PR