Opened 7 years ago
Closed 7 years ago
#28453 closed Bug (fixed)
transforms are not used for __exact=None lookup
Reported by: | Sergey Fedoseev | Owned by: | Sergey Fedoseev |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.11 |
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
Related to #25946.
class NulledTextField(models.TextField): pass @NulledTextField.register_lookup class NulledTransform(models.Transform): lookup_name = 'nulled' template = 'NULL' class TestModel(models.Model): nulled_text_field = NulledTextField(null=True) >>> Season.objects.filter(nulled_text_field__nulled__isnull=True).exists() True >>> Season.objects.filter(nulled_text_field__nulled__exact=None).exists() False
Change History (4)
comment:1 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
Has patch: | set |
---|
comment:3 by , 7 years ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
Type: | Uncategorized → Bug |
Note:
See TracTickets
for help on using tickets.
PR