#7961 closed (duplicate)
Removing select statements added through extra() does not remove the corresponding select_params
Reported by: | Matthijs | Owned by: | Malcolm Tredinnick |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Keywords: | extra query queryset | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
related to: #7957
if you add a (using extra()) a select statement with key 'foo' and a corresponding parameter 'bar' and then use filter(id='1').values_list('id')
the query to the database will use 'bar', '1' as parameters instead of just '1'. This results in either the wrong data returned or nothing returned.
Attachments (2)
Change History (10)
by , 16 years ago
Attachment: | django_extra.diff added |
---|
by , 16 years ago
Attachment: | reproduce_extra_problem.py added |
---|
comment:1 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:4 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
Going to assign to me so that I can find it quickly. This is now in my review and commit pile and getting close to the top.
comment:5 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:6 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Closing as a dupe of #8191 just so that there's a single tracking ticket for the broader problem. This is a symptom of the parameter handling in extra()
.
File to reproduce the problem and verify the fix