Skip to content

Exception raised when uploading invalid device bay CSV #15067

Closed
@candlerb

Description

@candlerb

Deployment Type

Self-hosted

NetBox Version

v3.7.2

Python Version

3.8

Steps to Reproduce

  1. Go to /dcim/device-bays/import/ (from left menu: Devices > Device Bays > Upload)
  2. Paste in the following data, select format as "CSV", then Submit.

Case 1:

name
foo

Case 2:

name,device
foo,blah-nonexistent

Expected Behavior

A meaningful error message. In the first case, something like "missing column device". In the second case, something like "device "blah-nonexistent" does not exist"

Observed Behavior

A RelatedObjectDoesNotExist exception is raised.

<class 'dcim.models.device_components.DeviceBay.device.RelatedObjectDoesNotExist'>

DeviceBay has no device.

Python version: 3.8.10
NetBox version: 3.7.2

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions