Event Rule breaks when script is deleted #9110

Closed
opened 2025-12-29 20:45:33 +01:00 by adam · 2 comments
Owner

Originally created by @renatoalmeidaoliveira on GitHub (Jan 18, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

Self-hosted

NetBox Version

v3.7.0

Python Version

3.8

Steps to Reproduce

  1. Create a Script
  2. Create a EventRule linked with the created Script
  3. Delete the Script
  4. Try to open the EventRule

Expected Behavior

The Script deletion cascades the deletion of the EventRule

Observed Behavior

<class 'django.urls.exceptions.NoReverseMatch'>

Reverse for 'script' with keyword arguments '{'module': '', 'name': 'EventRule'}' not found. 1 pattern(s) tried: ['extras/scripts/(?P<module>[^/]+)/(?P<name>[^/]+)/\\Z']

Python version: 3.10.13
NetBox version: 3.7.0
Originally created by @renatoalmeidaoliveira on GitHub (Jan 18, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type Self-hosted ### NetBox Version v3.7.0 ### Python Version 3.8 ### Steps to Reproduce 1. Create a Script 2. Create a EventRule linked with the created Script 3. Delete the Script 4. Try to open the EventRule ### Expected Behavior The Script deletion cascades the deletion of the EventRule ### Observed Behavior ``` <class 'django.urls.exceptions.NoReverseMatch'> Reverse for 'script' with keyword arguments '{'module': '', 'name': 'EventRule'}' not found. 1 pattern(s) tried: ['extras/scripts/(?P<module>[^/]+)/(?P<name>[^/]+)/\\Z'] Python version: 3.10.13 NetBox version: 3.7.0 ```
adam added the type: bugstatus: acceptedseverity: mediumtopic: event rules labels 2025-12-29 20:45:33 +01:00
adam closed this issue 2025-12-29 20:45:33 +01:00
Author
Owner

@renatoalmeidaoliveira commented on GitHub (Jan 18, 2024):

The user can't manually delete the EventRule either, it trows the error:


'NoneType' object has no attribute 'scripts'

Python version: 3.10.13
NetBox version: 3.7.0
@renatoalmeidaoliveira commented on GitHub (Jan 18, 2024): The user can't manually delete the EventRule either, it trows the error: ```<class 'AttributeError'> 'NoneType' object has no attribute 'scripts' Python version: 3.10.13 NetBox version: 3.7.0 ```
Author
Owner

@jeffgdotorg commented on GitHub (Jan 19, 2024):

#14438 is related. We should handle this one today since the other issue is scheduled for 4.0.

@jeffgdotorg commented on GitHub (Jan 19, 2024): #14438 is related. We should handle this one today since the other issue is scheduled for 4.0.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9110