networktocode / ntc-netbox-plugin-onboarding

A plugin for NetBox to easily onboard new devices.
Other
246 stars 47 forks source link

Uppercase Device Type Model slug causes duplicate key value error #52

Closed Vaultpls closed 4 years ago

Vaultpls commented 4 years ago

Environment

Steps to Reproduce

  1. Create a Device Type with a Model Slug that is in ALL CAPITALS(also had the main name of the device as the same)
  2. Onboard the device

Expected Behavior

Successful onboarding of device, no new addition of the Device Type.

Observed Behavior

Platform is successfully populated but after that it fails.

Seems it was trying to recreate the Device Type even if I set it to not create if not found.

Onboarding Tasks states the following:

fail-general: duplicate key value violates unique constraint "dcim_devicetype_manufacturer_id_model_17948c0c_uniq" DETAIL: Key (manufacturer_id, model)=(2, WS-C2960C-8TC-L) already exists.

Workaround

Go to device type -> model slug and turn the UPPERCASE into lowercase. Did not modify the device model name

dgarros commented 4 years ago

should be fixed in the latest release > 2.0.0