Cannot filter on interfaces where mark_connected is true. #307

Closed
opened 2026-04-05 16:25:21 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jvalente-salemstate on 2/19/2026

NetBox Edition

NetBox Community

NetBox Version

v4.5.3

I also observed this in v4.5.1 prior to updating before opening an issue.

Python Version

3.12

Steps to Reproduce

This occurs both in the Web UI and QraphQL

  • Filters work correctly for interfaces that are neither cabled or connected
  • Filters work correctly for interfaces that are cabled.
  • Filters work correctly (i.e. no results since they're mutually exclusive) for interfaces both connected and cabled
  • Filters do not work for connected, non-cabled devices.

Effectively, searching for cabled devices or "connected" devices will yield the same dataset.

query MyQuery {
  interface_list(filters: {id: {exact: "24022"}}) {
    name
    mark_connected
    cable_end
    cable {
      id
    }
  }
}

---

{
  "data": {
    "interface_list": [
      {
        "name": "1/30",
        "mark_connected": true,
        "cable_end": null,
        "cable": null
      }
    ]
  }
}

Filter on the same interface with connected set to true

query MyQuery {
  interface_list(filters: {id: {exact: "24022"}, connected: true}) {
    name
    mark_connected
    cable_end
    cable {
      id
    }
  }
}

---

{
  "data": {
    "interface_list": []
  }
}

If filtering on connected and cable.id, the values are functionally mutually exclusive

query MyQuery {
  interface_list(filters: {connected: true, cable: {id: {is_null: true}}}) {
    name
    mark_connected
    cable_end
    cable {
      id
    }
  }
}
---
{
  "data": {
    "interface_list": []
  }
}


---
query MyQuery {
  interface_list(filters: {connected: false, cable: {id: {is_null: false}}}) {
    name
    mark_connected
    cable_end
    cable {
      id
    }
  }
}
---
{
  "data": {
    "interface_list": []
  }
}


---
query MyQuery {
  interface_list(filters: {connected: true, cable: {id: {is_null: false}}}) {
    name
    mark_connected
    cable_end
    cable {
      id
    }
  }
}
---
{
  "data": {
    "interface_list": [
      {
        "name": "GE_0_1",
        "mark_connected": false,
        "cable_end": "B",
        "cable": {
          "id": "6913"
        }
    ]   
   }
 }


---

query MyQuery {
  interface_list(filters: {connected: false, cable: {id: {is_null: true}}}) {
    name
    mark_connected
    cable_end
    cable {
      id
    }
  }
}
---
{
  "data": {
    "interface_list": [
      {
        "name": "eth0",
        "mark_connected": false,
        "cable_end": null,
        "cable": null
      }
    ]
  }
}

Expected Behavior

Filters for connected being true should return only interfaces where mark_connected is true.

Observed Behavior

connected: true only returning cabled interfaces where mark_connected is false, OR nothing if also searching for interfaces where cable_id is null even though only non-cabled can be marked connected.

*Originally created by @jvalente-salemstate on 2/19/2026* ### NetBox Edition NetBox Community ### NetBox Version v4.5.3 I also observed this in v4.5.1 prior to updating before opening an issue. ### Python Version 3.12 ### Steps to Reproduce This occurs both in the Web UI and QraphQL - Filters work correctly for interfaces that are neither cabled or connected - Filters work correctly for interfaces that are cabled. - Filters work correctly (i.e. no results since they're mutually exclusive) for interfaces both connected and cabled - Filters **do not** work for connected, non-cabled devices. Effectively, searching for cabled devices or "connected" devices will yield the same dataset. ``` query MyQuery { interface_list(filters: {id: {exact: "24022"}}) { name mark_connected cable_end cable { id } } } --- { "data": { "interface_list": [ { "name": "1/30", "mark_connected": true, "cable_end": null, "cable": null } ] } } ``` Filter on the same interface with `connected` set to `true` ``` query MyQuery { interface_list(filters: {id: {exact: "24022"}, connected: true}) { name mark_connected cable_end cable { id } } } --- { "data": { "interface_list": [] } } ``` If filtering on `connected` and `cable.id`, the values are functionally mutually exclusive ``` query MyQuery { interface_list(filters: {connected: true, cable: {id: {is_null: true}}}) { name mark_connected cable_end cable { id } } } --- { "data": { "interface_list": [] } } --- query MyQuery { interface_list(filters: {connected: false, cable: {id: {is_null: false}}}) { name mark_connected cable_end cable { id } } } --- { "data": { "interface_list": [] } } --- query MyQuery { interface_list(filters: {connected: true, cable: {id: {is_null: false}}}) { name mark_connected cable_end cable { id } } } --- { "data": { "interface_list": [ { "name": "GE_0_1", "mark_connected": false, "cable_end": "B", "cable": { "id": "6913" } ] } } --- query MyQuery { interface_list(filters: {connected: false, cable: {id: {is_null: true}}}) { name mark_connected cable_end cable { id } } } --- { "data": { "interface_list": [ { "name": "eth0", "mark_connected": false, "cable_end": null, "cable": null } ] } } ``` ### Expected Behavior Filters for `connected` being `true` should return only interfaces where `mark_connected` is true. ### Observed Behavior `connected: true` only returning cabled interfaces where `mark_connected` is `false`, OR nothing if also searching for interfaces where cable_id is null even though only non-cabled can be marked connected.
Sign in to join this conversation.
No Label netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#307