Update Reference>Conditions example code after feature #9876 addition #8798

Closed
opened 2025-12-29 20:41:18 +01:00 by adam · 1 comment
Owner

Originally created by @kenny-y-dev on GitHub (Nov 1, 2023).

Originally assigned to: @kenny-y-dev on GitHub.

Change Type

Correction

Area

Other

Proposed Changes

With the addition of feature #9876 to handle conditional tag checks by parsing the tags list of dictionaries, the attr key in a conditional check requires a key in the tag dict to check against. For example, if checking for a tag with the slug exempt, the check would be:

{ "attr": "tags.slug", "value": "exempt", "op": "contains" }

The current conditional example in the documentation appears to have the intention of checking for the presence of a tag, though does not currently work correctly with only "attr": "tags and no deeper key selection.

Originally created by @kenny-y-dev on GitHub (Nov 1, 2023). Originally assigned to: @kenny-y-dev on GitHub. ### Change Type Correction ### Area Other ### Proposed Changes With the addition of feature #9876 to handle conditional tag checks by parsing the `tags` list of dictionaries, the `attr` key in a conditional check requires a key in the tag dict to check against. For example, if checking for a tag with the slug `exempt`, the check would be: `{ "attr": "tags.slug", "value": "exempt", "op": "contains" }` The [current conditional example](https://docs.netbox.dev/en/stable/reference/conditions/) in the documentation appears to have the intention of checking for the presence of a tag, though does not currently work correctly with only `"attr": "tags` and no deeper key selection.
adam added the status: acceptedtype: documentation labels 2025-12-29 20:41:18 +01:00
adam closed this issue 2025-12-29 20:41:18 +01:00
Author
Owner

@kenny-y-dev commented on GitHub (Nov 1, 2023):

Have a PR ready to go for the quick doc fix, though saw it may auto close if the issue isn't assigned to me. Happy to submit if assigned; thanks!

@kenny-y-dev commented on GitHub (Nov 1, 2023): Have a PR ready to go for the quick doc fix, though saw it may auto close if the issue isn't assigned to me. Happy to submit if assigned; thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8798