#1519 closed defect (fixed)
[patch] [magic-removal] extra(select=) lookup option is out of order
| Reported by: | Antti Kaihola | Owned by: | Adrian Holovaty |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
In the documentation it's stated that the extra(select=) lookup option expects a dictionary mapping attribute names to SQL clauses. QuerySet._select is indeed initialize as an empty dict, but elsewhere in query.py it's assumed that select= is a list of 2-tuples.
Attachments (2)
Change History (4)
by , 20 years ago
| Attachment: | extra-select-dict.diff added |
|---|
by , 20 years ago
| Attachment: | extra-select-list.diff added |
|---|
alternate fix to make extra(select=) accept a list of 2-tuples
comment:1 by , 20 years ago
comment:2 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Thanks for the patch akaihola, even though I missed it. :) Next time I should look a little harder for existing tickets. Fixed in [2560]
Note:
See TracTickets
for help on using tickets.
fix extra(select=) to accept a dict