Django

Code

Ticket #7053 (closed: fixed)

Opened 5 months ago

Last modified 5 months ago

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

Reported by: jlenton Assigned to: nobody
Milestone: Component: Uncategorized
Version: queryset-refactor Keywords:
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

valueslist_extra_select_test.diff (0.6 kB) - added by jlenton on 04/21/08 13:24:27.
a test that shows the buggy behavior

Change History

04/21/08 13:24:27 changed by jlenton

  • attachment valueslist_extra_select_test.diff added.

a test that shows the buggy behavior

04/22/08 12:37:04 changed by mtredinnick

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

04/23/08 04:53:22 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #7053 (valueslist returns fields added via extra's select as well as those specified)




Change Properties
Action