Replies: 1 comment
-
fixed by using: interface.cable.delete() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
NetBox version
v3.4.1
Python version
3.8
Steps to Reproduce
Using a custom script to default interfaces but not being able to set the connected_endpoints to nothing:
The part of the script where the interface is getting updated
Part of code
Expected Behavior
The removal of the "connection" field in the gui
Observed Behavior
Error
An exception occurred: AttributeError: 'list' object has no attribute 'set'
Traceback (most recent call last):
File "/opt/netbox/netbox/extras/scripts.py", line 464, in _run_script
script.output = script.run(data=data, commit=commit)
File "/opt/netbox-scripts/daniel.py", line 148, in run
interface.connected_endpoints.set([])
AttributeError: 'list' object has no attribute 'set'
I've looked at the debug window but cannot find a stracktrace or something pointing me in the right direction, so maybe somebody here knows how to clear the connected_endpoints.
Beta Was this translation helpful? Give feedback.
All reactions