Deleting a "Notification Group" causes Server Error "NotificationGroup matching query does not exist" in the Event Rule edit view #11286

Closed
opened 2025-12-29 21:42:57 +01:00 by adam · 1 comment
Owner

Originally created by @joernheissler on GitHub (Jun 13, 2025).

Originally assigned to: @jnovinger on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.3.2

Python Version

3.11

Steps to Reproduce

  1. Navigate to Operations/Notification Groups
  2. Add a new notification group:
    • Name "foo"
    • select your user as target
    • (details probably don't matter here)
  3. Navigate to Operations/Event Rules
  4. Add a new event rule:
    • Name "bar"
    • Object types: Circuits > Circuit
    • Event types: Object created
    • Action type: Notification
    • Notification group: foo
  5. Navigate to Operations/Notification Groups
  6. Delete the "foo" group. Confirm the deletion.
  7. Navigate to Operations/Event Rules
  8. 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.3

If 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.

Originally created by @joernheissler on GitHub (Jun 13, 2025). Originally assigned to: @jnovinger on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.3.2 ### Python Version 3.11 ### Steps to Reproduce 1. Navigate to Operations/Notification Groups 2. Add a new notification group: * Name "foo" * select your user as target * (details probably don't matter here) 3. Navigate to Operations/Event Rules 4. Add a new event rule: * Name "bar" * Object types: Circuits > Circuit * Event types: Object created * Action type: Notification * Notification group: foo 5. Navigate to Operations/Notification Groups 6. Delete the "foo" group. Confirm the deletion. 7. Navigate to Operations/Event Rules 8. 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.3 > > If 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.
adam added the type: bugstatus: acceptedseverity: lowtopic: event rules labels 2025-12-29 21:42:57 +01:00
adam closed this issue 2025-12-29 21:42:57 +01:00
Author
Owner

@jnovinger commented on GitHub (Jun 13, 2025):

Thanks for the detailed report, @joernheissler !

@jnovinger commented on GitHub (Jun 13, 2025): Thanks for the detailed report, @joernheissler !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11286