Code

Opened 5 years ago

Closed 5 years ago

#12084 closed (fixed)

Document the return type of QuerySet.update()

Reported by: anonymous Owned by: nobody
Component: Documentation Version: 1.1
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

From the documentation: "The update() method is applied instantly and doesn't return anything […]"

This is not true. QuerySet.update() returns the number of rows affected by the UPDATE query, which is quite useful. The update tests rely on this feature. Make it part of the public API.

Attachments (1)

12084.diff (1.1 KB) - added by timo 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by timo

comment:1 Changed 5 years ago by timo

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 5 years ago by adrian

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

(In [12181]) Fixed #12084 -- Documented the fact that QuerySet.update() returns the number of affected rows. Thanks, 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.