Code

Opened 5 years ago

Closed 4 years ago

#10947 closed (fixed)

Queryset "__in" documentation missing list() call

Reported by: julianb 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 timo 4 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 5 years ago by Alex

  • Triage Stage changed from Unreviewed to Accepted

Changed 4 years ago by timo

comment:3 Changed 4 years ago by timo

  • Has patch set
  • Triage Stage changed from Accepted to Ready for checkin

my fault, ticket is correct, patch attached.

comment:4 Changed 4 years ago by adrian

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

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

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.