Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception raised when uploading invalid device bay CSV #15067

Closed
candlerb opened this issue Feb 7, 2024 · 1 comment · Fixed by #15139
Closed

Exception raised when uploading invalid device bay CSV #15067

candlerb opened this issue Feb 7, 2024 · 1 comment · Fixed by #15139
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@candlerb
Copy link
Contributor

candlerb commented Feb 7, 2024

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
@candlerb candlerb added the type: bug A confirmed report of unexpected behavior in the application label Feb 7, 2024
@candlerb
Copy link
Contributor Author

candlerb commented Feb 7, 2024

Note: these errors are properly handled when uploading Interfaces.

Case 1:

name
foo

image

Case 2:

name,type,device
foo,virtual,blah-nonexistent

image

@jeremystretch jeremystretch self-assigned this Feb 13, 2024
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation severity: low Does not significantly disrupt application functionality, or a workaround is available labels Feb 13, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
2 participants