Device -> parent_device -> device_bay url wrongly refers to dcim/rear-ports #2883

Closed
opened 2025-12-29 18:23:04 +01:00 by adam · 0 comments
Owner

Originally created by @louis-6wind on GitHub (Sep 18, 2019).

Environment

  • Python version: 3.6.6
  • NetBox version: 2.5.13 & 2.6.3

Steps to Reproduce

  1. Add a parent device
  2. Add a child device
  3. Associate child device to parent device
  4. Get child device on API

ObservedBehavior

{
    "id": 892,
    "name": "1-12:R53B05:51 to 49-60:R53B10:51",
    "display_name": "1-12:R53B05:51 to 49-60:R53B10:51",
(...)
    "parent_device": {
        "id": 891,
        "url": "http://netbox/api/dcim/devices/891/",
        "name": "R53B05:51 to R53B10 R54B10",
        "display_name": "R53B05:51 to R53B10 R54B10",
        "device_bay": {
            "id": 832,
            "url": "http://netbox/api/dcim/rear-ports/832/",
            "device": {
                "id": 891,
                "url": "http://netbox/api/dcim/devices/891/",
                "name": "R53B05:51 to R53B10 R54B10",
                "display_name": "R53B05:51 to R53B10 R54B10"
            },
            "name": "1"
        }
    },
(...)
}

Expected Behavior

Originally created by @louis-6wind on GitHub (Sep 18, 2019). ### Environment * Python version: 3.6.6 * NetBox version: 2.5.13 & 2.6.3 ### Steps to Reproduce 1. Add a parent device 2. Add a child device 3. Associate child device to parent device 4. Get child device on API ### ObservedBehavior * device -> parent_device -> device_bay url refers to http://netbox/api/dcim/rear-ports/ID ``` { "id": 892, "name": "1-12:R53B05:51 to 49-60:R53B10:51", "display_name": "1-12:R53B05:51 to 49-60:R53B10:51", (...) "parent_device": { "id": 891, "url": "http://netbox/api/dcim/devices/891/", "name": "R53B05:51 to R53B10 R54B10", "display_name": "R53B05:51 to R53B10 R54B10", "device_bay": { "id": 832, "url": "http://netbox/api/dcim/rear-ports/832/", "device": { "id": 891, "url": "http://netbox/api/dcim/devices/891/", "name": "R53B05:51 to R53B10 R54B10", "display_name": "R53B05:51 to R53B10 R54B10" }, "name": "1" } }, (...) } ``` ### Expected Behavior * device -> parent_device -> device_bay url refers to http://netbox/api/dcim/device-bays/ID
adam added the type: bugstatus: accepted labels 2025-12-29 18:23:04 +01:00
adam closed this issue 2025-12-29 18:23:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2883