#32461: PostgreSQL UNACCENT function not working on annotations
-------------------------------------+-------------------------------------
     Reporter:  Ismael Jerez         |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.postgres     |                  Version:  2.2
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:  annotate,            |             Triage Stage:
  annotations, unaccent, postgresql  |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Ismael Jerez):

 Thanks for your comment.

 My apologise, I forgot to add "icontains" to the filtering code. We have
 to work in Django 2.2 until my organization decides to upgrade to 3.x
 version.

 I will try to test in a simple way in order to validate if it is a bug of
 Django 2.2 version or not.

 I will reply you with my results soon.

 Replying to [comment:1 Mariusz Felisiak]:
 > Thanks for this report, however it works for me. I've tried with the
 following test:
 >
 > {{{
 >     def test_unaccent_annotation(self):
 >         from django.db.models import Value
 >         qs = self.Model.objects.annotate(
 >             field_custom=Value('àéÖŻÓłĆ'),
 >         ).filter(field_custom__unaccent__icontains='zolc')
 > }}}
 >
 > Also, Django 2.2 doesn't receive bugfixes anymore. Can you reproduce
 this issue with Django 3.1+? Can you also provide a sample project or an
 example that is at lease semantically correct? I'm not sure how the
 described queryset could return any rows since `field_custom` is always
 `Yes` or `No` and you filter against `és`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32461#comment:2>
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/072.93f98147e8e2cb9d4f92f486669e3ab5%40djangoproject.com.

Reply via email to