Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1532 closed defect (fixed)

[patch] [magic-removal] select arg for QuerySet.extra() should be a dict

Reported by: anonymous 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

According to the 0.91 docs, this should work:

MyObject.objects.extra(
    select={
        'my_new_attr': 'select count(*) from ...'
    }
)

But new behavior seems to expect select to be a list of ('attribute_name', 'query') tuples. I don't see any particular reason for it to change, nor can I find any documentation on it. Anyone want to defend the current behavior before I patch it?

Attachments (1)

query_set_select.diff (1.0 KB ) - added by jkocherhans 18 years ago.

Download all attachments as: .zip

Change History (3)

by jkocherhans, 18 years ago

Attachment: query_set_select.diff added

comment:1 by jkocherhans, 18 years ago

Resolution: fixed
Status: newclosed

(In [2560]) No comments so... fixed #1532.

comment:2 by Antti Kaihola, 18 years ago

This also fixed #1519, which should probably be closed.

Note: See TracTickets for help on using tickets.
Back to Top