Skip to content
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

changelog does not retain object creation after it is deleted #7333

Closed
michaeldialpad opened this issue Sep 21, 2021 · 1 comment
Closed
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@michaeldialpad
Copy link

NetBox version

v3.0.1

Python version

3.7

Steps to Reproduce

  1. create new prefix object
  2. validated CREATE changelog entry is present
  3. delete newly created prefix object
  4. validated DELETE changelog entry is present, but CREATE changelog entry is gone

Expected Behavior

I would expect changelog to keep previous change state if it is deleted

Observed Behavior

once object is deleted, changelog is gone

@michaeldialpad michaeldialpad added the type: bug A confirmed report of unexpected behavior in the application label Sep 21, 2021
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Sep 21, 2021
@jeremystretch jeremystretch self-assigned this Sep 21, 2021
@jeremystretch
Copy link
Member

Looks like this is a regression introduced in 88d2441 when adding the changelog reverse relationship for GraphQL. Django forces a CASCADE action on this relationship when the related object is deleted. We can probably just omit the reverse relationship from the model and make the forward query directly within the GraphQL object.

Thanks for the report!

jeremystretch added a commit that referenced this issue Oct 27, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants