Opened 8 years ago

Closed 7 years ago

#10947 closed (fixed)

Queryset "__in" documentation missing list() call

Reported by: Julian Bez Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

http://docs.djangoproject.com/en/dev/ref/models/querysets/#in

The part in "Performance considerations" does not work that way. It's missing a list() call to really get a list into the query.

Attachments (1)

10947.diff (647 bytes) - added by Tim Graham 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 8 years ago by Tim Graham

As far as I can tell it is correct as is: values_list returns a list so calling list() on it would be redundant.

comment:2 Changed 7 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

Changed 7 years ago by Tim Graham

Attachment: 10947.diff added

comment:3 Changed 7 years ago by Tim Graham

Has patch: set
Triage Stage: AcceptedReady for checkin

my fault, ticket is correct, patch attached.

comment:4 Changed 7 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [12163]) Fixed #10947 -- Fixed error in in documentation. Thanks, julianb and timo

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