Skip to content

Conversation

@FragmentedPacket
Copy link
Contributor

Fixes #370

@FragmentedPacket FragmentedPacket merged commit bccfd3c into netbox-community:devel Nov 16, 2020
@FragmentedPacket FragmentedPacket deleted the lookup-id branch November 16, 2020 02:53
linkdd added a commit to linkdd/ansible_modules that referenced this pull request Jul 28, 2023
In the `nb_lookup` plugin, if we provide an `api_filter` containing the `id` field, it will use `.get()` instead of `.filter()`, thus returning the item instead of a list. See PR netbox-community#376 for more information.

This is fine if you supply only one id. But let's say you want to get a list of items by ids?

For example: `id=1 id=5`

I would expect to get a list of 2 items. But at the moment, it will return the first item only.

This change adds a simple check to see if we're supplying multiple ids.
rodvand pushed a commit that referenced this pull request Dec 10, 2023
In the `nb_lookup` plugin, if we provide an `api_filter` containing the `id` field, it will use `.get()` instead of `.filter()`, thus returning the item instead of a list. See PR #376 for more information.

This is fine if you supply only one id. But let's say you want to get a list of items by ids?

For example: `id=1 id=5`

I would expect to get a list of 2 items. But at the moment, it will return the first item only.

This change adds a simple check to see if we're supplying multiple ids.
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

Successfully merging this pull request may close these issues.

nb_lookup: Can't query IP-Address by id

1 participant