Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1519 closed defect (fixed)

[patch] [magic-removal] extra(select=) lookup option is out of order

Reported by: akaihola Owned by: adrian
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: UI/UX:

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 akaihola 9 years ago.
fix extra(select=) to accept a dict
extra-select-list.diff (1.5 KB) - added by akaihola 9 years ago.
alternate fix to make extra(select=) accept a list of 2-tuples

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by akaihola

fix extra(select=) to accept a dict

Changed 9 years ago by akaihola

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

comment:1 Changed 9 years ago by akaihola

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

comment:2 Changed 9 years ago by jkocherhans

  • Resolution set to fixed
  • Status changed from new to 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.
Back to Top