-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Deployment Type
Self-hosted
NetBox Version
v4.3.4
Python Version
3.11
Steps to Reproduce
- Create device without a name and module bays named
Bay 1andBay 2in positions 1 and 2
{
"id": 11531,
"display": "ACME FOBOT Chassis 1 (11531)",
"name": null,
"device_type": {
"id": 731,
"display": "FOBOT Chassis 1",
"manufacturer": {
"id": 234,
"display": "ACME",
"name": "ACME",
"slug": "acme",
},
"model": "FOBOT Chassis 1",
"slug": "fobot-chassis-1",
- Create a module
Module1234 - Import modules
device,module_bay,module_type,status
ACME FOBOT Chassis 1 (11531),"Bay 1",Module1234,planned
An error occurs:
Server Error
The complete exception is provided below:
<class 'dcim.models.modules.Module.module_bay.RelatedObjectDoesNotExist'>
Module has no module_bay.
Python version: 3.11.2
NetBox version: 4.3.3
Additional steps
4. Edit the device and add a name to the device created in step 1 FOBOT 1
5. Import modules
device,module_bay,module_type,status
FOBOT 1,"Bay 1",Module1234,planned
The Module is added to device from import when the device has a name.
Expected Behavior
Netbox shouldn't throw a Server Error when importing devices without names.
The import should fail with a failure message telling the user you can't import to devices without a name but to use device.id instead.
Workaround
Import to the device.id instead of the device
device.id,module_bay,module_type,status
11531,"Bay 1",Module1234,planned
Observed Behavior
Server Error
The complete exception is provided below:
<class 'dcim.models.modules.Module.module_bay.RelatedObjectDoesNotExist'>
Module has no module_bay.
Python version: 3.11.2
NetBox version: 4.3.3
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