KeyError when toggling interface connection status via web UI #1907

Closed
opened 2025-12-29 17:20:16 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Aug 7, 2018).

Environment

  • Python version: 3.5.6
  • NetBox version: 2.4.1

Steps to Reproduce

  1. Create a connection between any two interfaces.
  2. Click the "mark planned" button on one of the interfaces to toggle the connection status.

Expected Behavior

The connection status should be updated to "planned" and the table row should change color to blue.

Observed Behavior

The connection status does get updated in the database, however the API response fails, yielding a KeyError:

...
  File "/home/jstretch/netbox/netbox/utilities/api.py", line 74, in to_representation
    return {'value': obj, 'label': self._choices[obj]}
KeyError: 'False'
Originally created by @jeremystretch on GitHub (Aug 7, 2018). ### Environment * Python version: 3.5.6 * NetBox version: 2.4.1 ### Steps to Reproduce 1. Create a connection between any two interfaces. 2. Click the "mark planned" button on one of the interfaces to toggle the connection status. ### Expected Behavior The connection status should be updated to "planned" and the table row should change color to blue. ### Observed Behavior The connection status _does_ get updated in the database, however the API response fails, yielding a KeyError: ``` ... File "/home/jstretch/netbox/netbox/utilities/api.py", line 74, in to_representation return {'value': obj, 'label': self._choices[obj]} KeyError: 'False' ```
adam added the type: bugstatus: accepted labels 2025-12-29 17:20:16 +01:00
adam closed this issue 2025-12-29 17:20:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1907