Skip to content

Unable to add images to a Device Type using a PATCH request #15356

Closed
@sjurtf

Description

@sjurtf

Deployment Type

Self-hosted

NetBox Version

v3.7.3

Python Version

3.8

Steps to Reproduce

  1. Clone or download https://github.com/netbox-community/Device-Type-Library-Import/
  2. Run the importer NETBOX_URL=<your netbox instance> REPO_URL=https://github.com/netbox-community/devicetype-library/ NETBOX_TOKEN=<your netbox token> python3 nb-dt-import.py

This used to work, I believe this issue related to the change in this commit: 839609d.

It works in v3.7.2.

Expected Behavior

Images should be successfully uploaded and added to the Device Type.

Observed Behavior

Device-Type-Library-Import will get HTTP 400 error from the API when trying to upload images.

Example log message
Images {'front_image': '/Users/username/tmp/Device-Type-Library-Import/repo/elevation-images/Dell/dell-powervault-nx3240.front.png', 'rear_image': '/Users/username/tmp/Device-Type-Library-Import/repo/elevation-images/Dell/dell-powervault-nx3240.rear.png'} updated at https://localhost/api/dcim/device-types/393/: <Response [400]>

Further inspection of the response body shows:
{"front_image":["Enter a valid URL."],"rear_image":["Enter a valid URL."]}

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: 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