Opened 15 years ago

Closed 14 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: no UI/UX: no


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 Tim Graham 15 years ago.

Download all attachments as: .zip

Change History (3)

by Tim Graham, 15 years ago

Attachment: 12084.diff added

comment:1 by Tim Graham, 15 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin

comment:2 by Adrian Holovaty, 14 years ago

Resolution: fixed
Status: newclosed

(In [12181]) Fixed #12084 -- Documented the fact that QuerySet.update() returns the number of affected rows. Thanks, timo

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