Decimal values for cable lengths are not allowed in bulk edit #5263

Closed
opened 2025-12-29 19:26:03 +01:00 by adam · 1 comment
Owner

Originally created by @jbakklund on GitHub (Aug 31, 2021).

Originally assigned to: @sdktr on GitHub.

NetBox version

v3.0.0

Python version

3.7

Steps to Reproduce

  1. Navigate to .../dcim/cables/
  2. Mark a selection of cables and click on the "Edit Selected" button
  3. Set Length to for example, '1.5' and Length unit to 'Meters'

Expected Behavior

According to enhancement #6154, cable lengths should now allow decimal values.

Observed Behavior

NetBox responds with the following warning "Please enter a valid value. The two nearest valid values are 1 and 2."

Originally created by @jbakklund on GitHub (Aug 31, 2021). Originally assigned to: @sdktr on GitHub. ### NetBox version v3.0.0 ### Python version 3.7 ### Steps to Reproduce 1. Navigate to .../dcim/cables/ 2. Mark a selection of cables and click on the "Edit Selected" button 3. Set Length to for example, '1.5' and Length unit to 'Meters' ### Expected Behavior According to enhancement #6154, cable lengths should now allow decimal values. ### Observed Behavior NetBox responds with the following warning "Please enter a valid value. The two nearest valid values are 1 and 2."
adam added the type: bugstatus: accepted labels 2025-12-29 19:26:03 +01:00
adam closed this issue 2025-12-29 19:26:03 +01:00
Author
Owner

@sdktr commented on GitHub (Aug 31, 2021):

CableModel specifies a Decimal: db2993035d/netbox/dcim/models/cables.py (L77)

The CableBulkEditForm specifies the Integer: db2993035d/netbox/dcim/forms.py (L4589)

Can you assign this to me @jeremystretch so I can propose a PR?

@sdktr commented on GitHub (Aug 31, 2021): CableModel specifies a Decimal: https://github.com/netbox-community/netbox/blob/db2993035d03552a78ca99f1f243fbec9d08493a/netbox/dcim/models/cables.py#L77 The CableBulkEditForm specifies the Integer: https://github.com/netbox-community/netbox/blob/db2993035d03552a78ca99f1f243fbec9d08493a/netbox/dcim/forms.py#L4589 Can you assign this to me @jeremystretch so I can propose a PR?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5263