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

GraphQL filter not honoring NOT operator when trying to exclude tags. #16529

Closed
Kurnugia opened this issue Jun 12, 2024 · 1 comment
Closed
Labels
status: duplicate This issue has already been raised type: bug A confirmed report of unexpected behavior in the application

Comments

@Kurnugia
Copy link

Deployment Type

Self-hosted

NetBox Version

v4.0.5

Python Version

3.10

Steps to Reproduce

  1. Create a Tag called Excluded.
  2. Assign the tag to a Prefix.
  3. Open GraphiQL and execute the following query:
{
  inclusive: prefix_list(filters: {
    tag: "excluded"
  }) {
    prefix
    tags {
      name
      slug
    }
  }
  
  exclusive: prefix_list(filters: {
    NOT: {tag: "excluded"}
  }) {
    prefix
    tags {
      name
      slug
    }
  }
}
  1. View Results.

Expected Behavior

When the query is executed, the inclusive section of the query should return all prefixes that match this tag.

When the query is executed, the exclusive section of the query should return all prefixes that do not match this tag.

Observed Behavior

When executed, the same data is returned, as though the NOT clause is being ignored.

I also applied the tag to a Device and the same behavior is exhibited.

GQL Filter Issue

@Kurnugia Kurnugia added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Jun 12, 2024
@arthanson
Copy link
Collaborator

Closing as dupe of #16024

@jeremystretch jeremystretch added status: duplicate This issue has already been raised and removed status: needs triage This issue is awaiting triage by a maintainer labels Jun 13, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: duplicate This issue has already been raised type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants