Code

Opened 6 years ago

Closed 6 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 6 years ago.
a test that shows the buggy behavior

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by jlenton

a test that shows the buggy behavior

comment:1 Changed 6 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.