MongoEngine / MongoEngine/mongoengine

Post save signal with the delta information

Open
#1,317 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement Question
Dominant language
Python
Stars
4.3k
Forks
1.2k
Avg merge
4h 41m
Merged PRs (30d)
11

Description

I am looking at logging changes to some of my documents for auditing. Based on Issue #589 the post_save signal is now being sent before the changed fields are being cleared. It would be nice if somehow the updates/removals (self._delta) could be passed to the signal. Right now I have to recompute the delta. I'm not quite sure how this could be done in a backwards compatible way unless everyone receiver is using **kwargs. Maybe a new signal could be added.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the post_save signal behavior and the changed-field lifecycle described in Issue #589. Trace where self._delta is cleared and how signal receivers currently receive arguments. Done means the issue's requested delta information can reach post_save receivers without breaking existing receiver behavior, with tests covering the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, python
Domain
backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.