-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-Change-Data missing on cascaded Deletions #6389
Comments
Hi, the same bug is triggered, when (de-)selecting an IP as primary for a device (Make this the primary IP for the device/VM). It seems that there are some 'snapshot' function calls missing before saving the device object. |
Hi, to me the way and locations where the snapshot method of the ChangeLogginMixin is called seems a bit odd. I think the reason why it is not working on related models is simply because it gets called in the views when fetching a single object and it does not know anything about related objects. -- Jan |
Opting to put the call to That said, maybe it's an unnecessary optimization. We could try calling it inside |
A lot has changed since this bug was opened, but this seems solvable now by simply calling |
NetBox version
v2.11.3
Python version
3.8
Steps to Reproduce
Expected Behavior
Pre-Change-Data should be in the Changelog.
This is the case, if e.g. an IP-Address is deleted directly, but not when its deleted by a cascade.
Observed Behavior
Pre-Change-Data is missing in the Changelog, when an object is deleted by a cascade.
The text was updated successfully, but these errors were encountered: