#31390: Using Q as rhs value in filter causes SQL Syntax error
-------------------------------------+-------------------------------------
     Reporter:  Marcin Wieczorek     |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  Q filter SQL         |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Marcin Wieczorek):

 I know it's a misuse, I don't expect such code to work. I just thought an
 exception should be raised, an SQL error could potentially do more damage.
 As I said, I caused the error in a situation that IDE/parser/runtime
 couldn't detect the issue until the SQL error (so the misuse wasn't
 obvious). An exception is raised when you pass a string instead of an int,
 so should be for Qs.

 Anyway thanks for your input, I won't seek further justification for my
 issue if you say it's invalid.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31390#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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.b6ebbccdb72cc9275a7c27a440c7ac9b%40djangoproject.com.

Reply via email to