Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Keyhaku opened this issue Mar 9, 2018 · 0 comments
Open

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

Keyhaku opened this issue Mar 9, 2018 · 0 comments

Comments

@Keyhaku
Copy link

Keyhaku commented Mar 9, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant