Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Bug : fields of type Selection are not correctly retrieved #17

Description

@Keyhaku

Hello,

netbox.py doesn't correctly retrieve the fields which are type of "Selection" (for example the status field) , whether it is for grouping or for fetching hostvars.

netbox version used : 2.3.1

The structure of this type of field is like this

 "status": {
                "value": 1,
                "label": "Active"
            }

The problem seems to be that netbox.py retrieve only the [general] fields with the key name.

The bug is also present with custom_field of type Selection, but this time it's the key value that is fetched and thus incorrectly group by the id of the selected item.
Changing the key_map for custom_field to label fix this bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions