Opened 7 years ago

Closed 4 years ago

#12086 closed New feature (duplicate)

Make QuerySet.delete() return the number of deleted objects

Reported by: Johannes Dollinger Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

This should be only be the number of objects deleted from the primary table (because other results may be hard to get with #7539).

Attachments (2)

12086.returning_qs_delete.diff (1006 bytes) - added by Johannes Dollinger 7 years ago.
12086.patch (9.6 KB) - added by Derek Willis 7 years ago.
Added tests and docs to patch

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by Johannes Dollinger

comment:1 Changed 7 years ago by anonymous

Has patch: set
Needs documentation: set
Needs tests: set

comment:2 Changed 7 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

comment:3 Changed 7 years ago by Derek Willis

milestone: 1.3
Owner: changed from nobody to Derek Willis
Status: newassigned

Changed 7 years ago by Derek Willis

Attachment: 12086.patch added

Added tests and docs to patch

comment:4 Changed 7 years ago by Derek Willis

Needs documentation: unset
Needs tests: unset

comment:5 Changed 6 years ago by Derek Willis

milestone: 1.3
Severity: Normal
Type: Uncategorized

comment:6 Changed 6 years ago by Derek Willis

Type: UncategorizedNew feature

comment:7 Changed 6 years ago by Julien Phalip

Patch needs improvement: set

The tests would need to be rewritten using unittests since this is now Django's preferred way.

comment:8 Changed 6 years ago by Derek Willis

Easy pickings: unset
Owner: changed from Derek Willis to nobody
Status: assignednew

comment:9 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:10 Changed 4 years ago by Tim Graham

Resolution: duplicate
Status: newclosed

Duplicate of #16891

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