Description
Deployment Type
Self-hosted
NetBox Version
v4.3.2
Python Version
3.11
Steps to Reproduce
- Navigate to Operations/Notification Groups
- Add a new notification group:
- Name "foo"
- select your user as target
- (details probably don't matter here)
- Navigate to Operations/Event Rules
- Add a new event rule:
- Name "bar"
- Object types: Circuits > Circuit
- Event types: Object created
- Action type: Notification
- Notification group: foo
- Navigate to Operations/Notification Groups
- Delete the "foo" group. Confirm the deletion.
- Navigate to Operations/Event Rules
- Click the small "edit" button of the "bar" event rule.
Expected Behavior
When deleting the notification group, I expect NetBox to ask me about deleting the event rule(s) which use this notification group. When deleting a referenced web hook, NetBox does ask about deleting the event rules.
I expected NetBox to not show me a "Server Error" (see "Observed Behavior").
Observed Behavior
When I delete the event group (step 6) netbox:
Delete notification group?
Confirm Deletion
Are you sure you want to delete foo?
[Cancel] [Delete]
When visiting https://netbox-stg.example.net/extras/event-rules/4/edit/?return_url=/extras/event-rules/ (step 8) I get:
Server Error
There was a problem with your request. Please contact an administrator.
The complete exception is provided below:
<class 'extras.models.notifications.NotificationGroup.DoesNotExist'>
NotificationGroup matching query does not exist.
Python version: 3.11.2
NetBox version: 4.3.2
Plugins:
netbox_reorder_rack: 1.1.3If further assistance is required, please post to the NetBox discussion forum on GitHub.
The broken event rule can be deleted, so no manual edits of the database are required.
Activity
[-]Deleting a "Notification Group" causes "" error in the Event Rule view[/-][+]Deleting a "Notification Group" causes Server Error "NotificationGroup matching query does not exist" in the Event Rule view[/+][-]Deleting a "Notification Group" causes Server Error "NotificationGroup matching query does not exist" in the Event Rule view[/-][+]Deleting a "Notification Group" causes Server Error "NotificationGroup matching query does not exist" in the Event Rule edit view[/+]jnovinger commentedon Jun 13, 2025
Thanks for the detailed report, @joernheissler !
Fixes #19702: add NotificationGroup.event_rules GenericRelation
Fixes #19702: add NotificationGroup.event_rules GenericRelation