Code

Opened 4 years ago

Closed 11 months ago

#12086 closed New feature (duplicate)

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

Reported by: emulbreh 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 emulbreh 4 years ago.
12086.patch (9.6 KB) - added by dwillis 4 years ago.
Added tests and docs to patch

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by emulbreh

comment:1 Changed 4 years ago by anonymous

  • Has patch set
  • Needs documentation set
  • Needs tests set
  • Patch needs improvement unset

comment:2 Changed 4 years ago by russellm

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 4 years ago by dwillis

  • milestone set to 1.3
  • Owner changed from nobody to dwillis
  • Status changed from new to assigned

Changed 4 years ago by dwillis

Added tests and docs to patch

comment:4 Changed 4 years ago by dwillis

  • Needs documentation unset
  • Needs tests unset

comment:5 Changed 3 years ago by dwillis

  • milestone 1.3 deleted
  • Severity set to Normal
  • Type set to Uncategorized

comment:6 Changed 3 years ago by dwillis

  • Type changed from Uncategorized to New feature

comment:7 Changed 3 years ago by julien

  • Patch needs improvement set

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

comment:8 Changed 3 years ago by dwillis

  • Easy pickings unset
  • Owner changed from dwillis to nobody
  • Status changed from assigned to new

comment:9 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:10 Changed 11 months ago by timo

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

Duplicate of #16891

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.