#25416: Queries are displayed without values quoted
----------------------------------------------+--------------------
Reporter: beruic | Owner: nobody
Type: Uncategorized | 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
----------------------------------------------+--------------------
I am debugging some queries, and noticed an error in how my queries are
printed.
What I did in my code, was:
{{{
query_set = ModelClass.objects.filter([other_filters]).exclude(field='')
}}}
The `query_set.query` then contains somthing like:
{{{
SELECT [columns] FROM [table] WHERE [other_filters] AND NOT ([table].field
= ))
}}}
The QuerySet works, but note that there are no quotes around the empty
string value.
I tried with a value instead, which also does not get quoted. Even if it
contains spaces.
The issue is the same if I use `.filter()` instead of `.exclude()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/25416>
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/049.42b0d862be7e9ad3d8af3cbc109526f2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.