#25638: update using Concat with Value causes error-encoding in SQLite
----------------------------------------------+--------------------
     Reporter:  bearxu83                      |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.8
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 Suppose we want to concat a string to the end of a Charfield.
 If we use:
   Model.objects.update(field=Concat('field', Value("end")))

 it will commit successfully, but the field will inlcude error-encoding
 text in SQLite. If we select the field from db, db will say
 "OperationalError: Could not decode to UTF-8 column 'name' with text".

 Instead,
   Model.objects.update(field=Concat('field', Value("end"), None))
 it will be OK.

--
Ticket URL: <https://code.djangoproject.com/ticket/25638>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.371b70ef83ec5768785e649d8d533504%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to