Changes between Initial Version and Version 1 of Ticket #28970
- Timestamp:
- Dec 28, 2017, 8:52:36 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28970 – Description
initial v1 1 Calling instance.save() inside a post_save signal receiver causes a loop and max recursion error. This problem is very easy to fall into and the best solution at the moment is call the QuerySet update()method, so that the post_save signal is not called in this case.1 Calling `instance.save()` inside a post_save signal receiver causes a loop and max recursion error. This problem is very easy to fall into and the best solution at the moment is call the `QuerySet update()` method, so that the post_save signal is not called in this case. 2 2 3 This is a very ugly workaround. I think Django should give the option to call save() and explicitly suppress signal emmiting. For example:3 This is a very ugly workaround. I think Django should give the option to call `save()` and explicitly suppress signal emitting. For example: 4 4 5 instance.save(post_save=False) 5 `instance.save(post_save=False)` 6 6 7 7 In the above method call, post_save signal would not be sent, and the loop problem would not occurs.