Import of Inventory Items fails when multiple devices with same name exists #7719

Closed
opened 2025-12-29 20:27:27 +01:00 by adam · 1 comment
Owner

Originally created by @AnythingOverIP on GitHub (Mar 3, 2023).

Originally assigned to: @arthanson on GitHub.

NetBox version

v3.4.3

Python version

3.8

Steps to Reproduce

  1. Create a device with name "test" in a site (i.e. Site_A)
  2. Create a second device with same name in another site (i.e. Site_B)
  3. Create a simple bulk import :

       device,name,serial
       test,hard_disk,12345

  1. Submit via /dcim/inventory-items/import/

Expected Behavior

A warning toast notification should tell us that import line 1 has more than one "target".

Observed Behavior

InventoryItem has no device:
image

When you load multiple lines, it's not telling you where the issue is.

Ideally, there should be a site field in the import options to ensure we target the right device.

Originally created by @AnythingOverIP on GitHub (Mar 3, 2023). Originally assigned to: @arthanson on GitHub. ### NetBox version v3.4.3 ### Python version 3.8 ### Steps to Reproduce 1. Create a device with name "test" in a site (i.e. Site_A) 2. Create a second device with same name in another site (i.e. Site_B) 3. Create a simple bulk import : ``` device,name,serial test,hard_disk,12345 ``` 4. Submit via /dcim/inventory-items/import/ ### Expected Behavior A warning toast notification should tell us that import line 1 has more than one "target". ### Observed Behavior InventoryItem has no device: ![image](https://user-images.githubusercontent.com/25624251/222788403-e530bc8c-b64e-4c6c-8f9e-9d12e07bea50.png) When you load multiple lines, it's not telling you where the issue is. Ideally, there should be a site field in the import options to ensure we target the right device.
adam added the type: bugstatus: accepted labels 2025-12-29 20:27:27 +01:00
adam closed this issue 2025-12-29 20:27:27 +01:00
Author
Owner

@AnythingOverIP commented on GitHub (Mar 3, 2023):

Same behavior if the device listed in the bulk import does not exists. Server Error instead of toast notification.

@AnythingOverIP commented on GitHub (Mar 3, 2023): Same behavior if the device listed in the bulk import does not exists. Server Error instead of toast notification.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7719