#28453: transforms are not used for __exact=None lookup
-------------------------------------------+------------------------
               Reporter:  Sergey Fedoseev  |          Owner:  nobody
                   Type:  Uncategorized    |         Status:  new
              Component:  Uncategorized    |        Version:  1.11
               Severity:  Normal           |       Keywords:
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  0
                  UI/UX:  0                |
-------------------------------------------+------------------------
 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
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28453>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.acaf812993c94b95dbfd7739861074ab%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to