tortoise / tortoise/tortoise-orm
Signals pre_save and post_save on UPDATE queries
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 516
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 9
Description
Does signals.pre_save and post_save actually work with UPDATE queries or they are only for INSERT?
I did some small search with grep+vim and could not find any call to post* when using update
If they actually are only for INSERT, it would be nice to have pre_update/post_update (or maybe the same pre_save/post_save working also with UPDATE)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the ORM's signal handling and UPDATE query path to verify whether pre_save and post_save are invoked for updates. Compare the existing INSERT behavior with the proposed pre_update/post_update or shared save-signal behavior, then define tests that distinguish both operations and document the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100