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

Notifications are automatically deleted when an associated object is deleted (in some cases) #17098

Closed
jeremystretch opened this issue Aug 7, 2024 · 0 comments
Assignees
Labels
beta Concerns a bug/feature in a beta release severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@jeremystretch
Copy link
Member

jeremystretch commented Aug 7, 2024

Deployment Type

NetBox Cloud

NetBox Version

v4.1-beta1

Python Version

3.10

Steps to Reproduce

  1. Manually create a Notification associated with an object (e.g. a site)
  2. Manually delete that object via the shell

Expected Behavior

The notification should persist, relying on the captured static representation of the object to denote the association.

Observed Behavior

The notification is deleted automatically, due to the generic relation on NotificationsMixin:

Note also, that if you delete an object that has a GenericRelation, any objects which have a GenericForeignKey pointing at it will be deleted as well.
...
Unlike ForeignKey, GenericForeignKey does not accept an on_delete argument to customize this behavior.

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation beta Concerns a bug/feature in a beta release severity: medium Results in substantial degraded or broken functionality for specfic workflows labels Aug 7, 2024
@jeremystretch jeremystretch self-assigned this Aug 7, 2024
jeremystretch added a commit that referenced this issue Aug 14, 2024
jeremystretch added a commit that referenced this issue Aug 15, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta Concerns a bug/feature in a beta release severity: medium Results in substantial degraded or broken functionality for specfic workflows 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

1 participant