Opened 3 hours ago
#36741 new Cleanup/optimization
Explain why pre_save/post_save signals are skipped when using QuerySet.update()
| Reported by: | Lam Phung | Owned by: | |
|---|---|---|---|
| Component: | Documentation | Version: | 5.2 |
| 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
The documentation for QuerySet.update() briefly mentions that the model’s save() method is not called and pre_save/post_save signals are not sent. However, the docs do not explain why this matters or what those signals normally do. This could be confusing for new contributors who are understanding the difference between update(), and manually calling save() on each object. The current documentation could be updated to include information on why selecting the wrong method could disrupt current logic, or when it is safe/unsafe to use update().