Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#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)

extra-select-dict.diff (1.0 KB ) - added by Antti Kaihola 18 years ago.
fix extra(select=) to accept a dict
extra-select-list.diff (1.5 KB ) - added by Antti Kaihola 18 years ago.
alternate fix to make extra(select=) accept a list of 2-tuples

Download all attachments as: .zip

Change History (4)

by Antti Kaihola, 18 years ago

Attachment: extra-select-dict.diff added

fix extra(select=) to accept a dict

by Antti Kaihola, 18 years ago

Attachment: extra-select-list.diff added

alternate fix to make extra(select=) accept a list of 2-tuples

comment:1 by Antti Kaihola, 18 years ago

Looks like #1532 fixed this with an identical patch applied in [2560]. Can and should I resolve this ticket as fixed?

comment:2 by jkocherhans, 18 years ago

Resolution: fixed
Status: newclosed

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.
Back to Top