Opened 4 years ago
Closed 4 years ago
#33031 closed Uncategorized (invalid)
How do I check if a child object is being destroyed by cascade delete from parent in post_delete signal of the child.
| Reported by: | Varun Agarwal | Owned by: | nobody |
|---|---|---|---|
| Component: | Uncategorized | Version: | 3.1 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I have two models, Document and DocumentGroup. Whenever a document is deleted, an API call is made from the post_delete signal to sync the changes in a third party app. A document group contains thousands of documents. I don't want thousands of API calls being made when I delete a document group. I want to identify if the delete is a cascade and skip those API calls and only call it once the whole document group is deleted.
Note:
See TracTickets
for help on using tickets.
Sorry, the issue tracker is not the appropriate place for usage questions. Please see TicketClosingReasons/UseSupportChannels.