#28214: IndexError for JSONField queries containing percent character in key
-------------------------------------+-------------------------------------
Reporter: mrsanders | Owner: André
| Ericson
Type: Bug | Status: assigned
Component: contrib.postgres | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by André Ericson):
Hey,
how should we tackle this? psycopg2 documentation says "in order to
include a literal % in the query you can use the %% string."
If we decide to escape it, it will break for people that already fixed
this in their own code by pre-escaping the JSON keys (ie: '%%total' key).
Another approach would be to add a note in the JSONField documentation
that '%' must be escaped.
--
Ticket URL: <https://code.djangoproject.com/ticket/28214#comment:3>
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/067.fa296a008a8e7e433420f3295a3053ce%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.