-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationThis issue is tentatively accepted pending a volunteer committed to its implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox Edition
NetBox Community
NetBox Version
v4.5.5
Python Version
3.12
Steps to Reproduce
- Create a faulty custom script; for example:
from extras.script import Script
# note the typo in the package name above
class TestScript(Script):
pass- Go to Customization > Scripts and Click on Add, and upload the faulty script. → the script won't appear in the list of existing scripts.
- Try to upload again (Usually you would fix any bugs, but for this case it's not necessary) and see the error.
Expected Behavior
A defective script shouldn't be registered in the database, or if it get's registered, there should be a way to remove or overwrite it.
Since there is no visible result on the first upload try, the user doesn't even see that something is wrong with his script.
Observed Behavior
A server error is raised:
<class 'django.db.utils.IntegrityError'>
duplicate key value violates unique constraint "core_managedfile_unique_root_path"
DETAIL: Key (file_root, file_path)=(scripts, test.py) already exists.
Python-Version: 3.12.3
NetBox-Version: 4.5.5
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationThis issue is tentatively accepted pending a volunteer committed to its implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application