#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)
Change History (3)
by , 19 years ago
Attachment: | query_set_select.diff added |
---|
comment:1 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [2560]) No comments so... fixed #1532.