Exception thrown when creating a power feed with a rack located on a different site than the power panel. #8925

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

Originally created by @kkthxbye-code on GitHub (Dec 6, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.6.6

Python version

3.11

Steps to Reproduce

I'll do very light replication steps here as the error is very obvious in the code (missing variable), hope that's okay.

  1. Create power feed
  2. Choose power panel on site x
  3. Choose rack on site y
  4. Save

Expected Behavior

No exception

Observed Behavior

<class 'KeyError'>

'site'

d10ac9b4a7/netbox/dcim/models/power.py (L175-L184)

{site} is present in the format string, but not in the format arguments (called rack_site instead).

Originally created by @kkthxbye-code on GitHub (Dec 6, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.6.6 ### Python version 3.11 ### Steps to Reproduce I'll do very light replication steps here as the error is very obvious in the code (missing variable), hope that's okay. 1. Create power feed 2. Choose power panel on site x 3. Choose rack on site y 4. Save ### Expected Behavior No exception ### Observed Behavior <class 'KeyError'> 'site' https://github.com/netbox-community/netbox/blob/d10ac9b4a7a37ad9a441f81176f997df95052829/netbox/dcim/models/power.py#L175-L184 {site} is present in the format string, but not in the format arguments (called rack_site instead).
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 20:42:54 +01:00
adam closed this issue 2025-12-29 20:42:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8925