Open RedLine89 opened 1 month ago
@RedLine89 can you please fix the script and upload a sample that can be run? For example:
module_bay=ModuleBay.objects
has an error because of the quotesthank you for checking @arthanson
Apologies for extra imports - cleaned it up. But the script has been working for me as-is (on the main
branch) though.
Could you please elaborate on "module_bay=ModuleBay.objects has an error because of the quotes". I don't get see any errors in IDE and NetBox executes it all right on the main
branch.
Let me know if anything else is required.
@RedLine89 at the f'1/{mda['mda-slot']}'
part - there are single quotes inside single quotes so it parses it incorrectly, changing the outer or inner quotes to double (") would fix it.
However, I think I know what the issue is in any case from working on a separate issue so this may be a moot point.
Thank you for looking into this @arthanson In regards of my last question though. How scripts are supposed to work with branching? Is banrching implicit for them and they will make modification for an active branch? or scripts need to be written using branching objects?
In other words, should this example script be modified to make changes at active branch?
Plugin Version
0.5.1
NetBox Version
4.1.4
Python Version
3.12.3
Steps to Reproduce
from dcim.choices import DeviceStatusChoices from dcim.models import Device, DeviceRole, DeviceType, Site, ModuleType, ModuleBay, Module
class NewBranchScript(Script):
Server Error There was a problem with your request. Please contact an administrator.
The complete exception is provided below:
<class 'dcim.models.device_components.ModuleBay.DoesNotExist'>
ModuleBay matching query does not exist.
Python version: 3.12.3 NetBox version: 4.1.4 Plugins: netbox_branching: 0.5.1 netbox_topology_views: 4.1.0 If further assistance is required, please post to the NetBox discussion forum on GitHub.
Home Page