Opened 9 years ago

Closed 9 years ago

#7053 closed (fixed)

valueslist returns fields added via extra's select as well as those specified

Reported by: jlenton Owned by: nobody
Component: Uncategorized Version: queryset-refactor
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

>>> Article.objects.extra(select={'id_plus_one': 'id+1'}).order_by('id').valueslist('id')
[(2, 1), (3, 2), (4, 3), (5, 4), (6, 5), (7, 6), (8, 7)]

Attachments (1)

valueslist_extra_select_test.diff (644 bytes) - added by jlenton 9 years ago.
a test that shows the buggy behavior

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by jlenton

a test that shows the buggy behavior

comment:1 Changed 9 years ago by Malcolm Tredinnick

Triage Stage: UnreviewedAccepted

comment:2 Changed 9 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [7446]) queryset-refactor: Fixed the interaction between extra(select=...) and
valuelist(). Fixed #7053.

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