Two devices of the same name returns MultipleObjectsReturned #4228

Closed
opened 2025-12-29 18:34:00 +01:00 by adam · 3 comments
Owner

Originally created by @ledgley on GitHub (Oct 30, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.9.4

Steps to Reproduce

  1. Create new device and assign to site, tenant, role. Set status to 'Decommisioning'
  2. Create another device of the same name, create with the same attributes, though assign to different site and set status to 'Active'
  3. Try to view device detail of either device

Expected Behavior

Load device detail view for both devices

Observed Behavior


get() returned more than one DeviceType -- it returned 2!

Python version: 3.6.8
NetBox version: 2.9.4
Originally created by @ledgley on GitHub (Oct 30, 2020). ### Environment * Python version: 3.6.8 * NetBox version: 2.9.4 ### Steps to Reproduce 1. Create new device and assign to site, tenant, role. Set status to 'Decommisioning' 2. Create another device of the same name, create with the same attributes, though assign to different site and set status to 'Active' 3. Try to view device detail of either device ### Expected Behavior Load device detail view for both devices ### Observed Behavior ```<class 'dcim.models.devices.DeviceType.MultipleObjectsReturned'> get() returned more than one DeviceType -- it returned 2! Python version: 3.6.8 NetBox version: 2.9.4 ```
adam added the status: revisions needed label 2025-12-29 18:34:00 +01:00
adam closed this issue 2025-12-29 18:34:00 +01:00
Author
Owner

@lampwins commented on GitHub (Oct 30, 2020):

Thank you for submitting this issue. Before any further work can be done, please upgrade to the most recent
stable release of NetBox (currently 2.9.7) as this issue may have already been addressed. Please then
update your issue to indicate whether further action is needed.

@lampwins commented on GitHub (Oct 30, 2020): Thank you for submitting this issue. Before any further work can be done, please upgrade to the most recent stable release of NetBox (currently 2.9.7) as this issue may have already been addressed. Please then update your issue to indicate whether further action is needed.
Author
Owner

@jeremystretch commented on GitHub (Oct 30, 2020):

FYI I'm not able to reproduce this on v2.9.7.

@jeremystretch commented on GitHub (Oct 30, 2020): FYI I'm not able to reproduce this on v2.9.7.
Author
Owner

@ledgley commented on GitHub (Oct 31, 2020):

Apologies, should've tested later release. Cannot reproduce on 2.9.8.

@ledgley commented on GitHub (Oct 31, 2020): Apologies, should've tested later release. Cannot reproduce on 2.9.8.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4228