Circuit Distances = Django Error: A field with precision 10, scale 4 must round to an absolute value less than 10^6. #11132

Closed
opened 2025-12-29 21:40:45 +01:00 by adam · 3 comments
Owner

Originally created by @meggert0823 on GitHub (May 6, 2025).

Originally assigned to: @jnovinger on GitHub.

Deployment Type

NetBox Cloud

NetBox Version

v4.2.3

Python Version

3.10

Steps to Reproduce

On an existing Circuit, click on "edit".
Enter a distance value of 999.99, select any unit (km, mi, etc.) and click save and it results in 1000 for distance.
Perform the same steps as above and try to save anything higher, and you will get the following error:

Server Error
There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'django.db.utils.DataError'>

numeric field overflow
DETAIL: A field with precision 10, scale 4 must round to an absolute value less than 10^6.

Python version: 3.11.0rc1
NetBox version: 4.2.3
Plugins:
nea_netbox_utils_plugin: 1.1.0
netbox_attachments: 7.0.0
netbox_bgp: 0.15.0
netbox_more_metrics: 0.3.2
netbox_napalm_plugin: 2.1.1
If further assistance is required, please post to the NetBox discussion forum on GitHub.

Home Page

Expected Behavior

Unable to save any distance beyond 999.99 in any circuit distance field, when the system at 10^6 should allow for values upto 1M, and the feature should allow for a larger range to represent the overall length (in km or miles) from a circuit provider.

Observed Behavior

This is the error you receive when attempting to save a distance value >999.99 in any unit of measure.

Server Error
There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'django.db.utils.DataError'>

numeric field overflow
DETAIL: A field with precision 10, scale 4 must round to an absolute value less than 10^6.

Python version: 3.11.0rc1
NetBox version: 4.2.3
Plugins:
nea_netbox_utils_plugin: 1.1.0
netbox_attachments: 7.0.0
netbox_bgp: 0.15.0
netbox_more_metrics: 0.3.2
netbox_napalm_plugin: 2.1.1
If further assistance is required, please post to the NetBox discussion forum on GitHub.

Home Page

Originally created by @meggert0823 on GitHub (May 6, 2025). Originally assigned to: @jnovinger on GitHub. ### Deployment Type NetBox Cloud ### NetBox Version v4.2.3 ### Python Version 3.10 ### Steps to Reproduce On an existing Circuit, click on "edit". Enter a distance value of 999.99, select any unit (km, mi, etc.) and click save and it results in 1000 for distance. Perform the same steps as above and try to save anything higher, and you will get the following error: Server Error There was a problem with your request. Please contact an administrator. The complete exception is provided below: <class 'django.db.utils.DataError'> numeric field overflow DETAIL: A field with precision 10, scale 4 must round to an absolute value less than 10^6. Python version: 3.11.0rc1 NetBox version: 4.2.3 Plugins: nea_netbox_utils_plugin: 1.1.0 netbox_attachments: 7.0.0 netbox_bgp: 0.15.0 netbox_more_metrics: 0.3.2 netbox_napalm_plugin: 2.1.1 If further assistance is required, please post to the [NetBox discussion forum](https://github.com/netbox-community/netbox/discussions) on GitHub. [Home Page](https://netbox01.point-broadband.net/) ### Expected Behavior Unable to save any distance beyond 999.99 in any circuit distance field, when the system at 10^6 should allow for values upto 1M, and the feature should allow for a larger range to represent the overall length (in km or miles) from a circuit provider. ### Observed Behavior This is the error you receive when attempting to save a distance value >999.99 in any unit of measure. Server Error There was a problem with your request. Please contact an administrator. The complete exception is provided below: <class 'django.db.utils.DataError'> numeric field overflow DETAIL: A field with precision 10, scale 4 must round to an absolute value less than 10^6. Python version: 3.11.0rc1 NetBox version: 4.2.3 Plugins: nea_netbox_utils_plugin: 1.1.0 netbox_attachments: 7.0.0 netbox_bgp: 0.15.0 netbox_more_metrics: 0.3.2 netbox_napalm_plugin: 2.1.1 If further assistance is required, please post to the [NetBox discussion forum](https://github.com/netbox-community/netbox/discussions) on GitHub. [Home Page](https://netbox01.point-broadband.net/)
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:40:45 +01:00
adam closed this issue 2025-12-29 21:40:45 +01:00
Author
Owner

@meggert0823 commented on GitHub (May 6, 2025):

UPDATE: I have tested this now on a few versions, including 4.2.3 and 4.2.5 (but not 4.3.0 at this time).

@meggert0823 commented on GitHub (May 6, 2025): UPDATE: I have tested this now on a few versions, including 4.2.3 and 4.2.5 (but not 4.3.0 at this time).
Author
Owner

@arthanson commented on GitHub (May 6, 2025):

This works for feet and meters, however if you do select kilometers or miles first (getting the error) then select meters it will fail with the same error.

@arthanson commented on GitHub (May 6, 2025): This works for feet and meters, however if you do select kilometers or miles first (getting the error) then select meters it will fail with the same error.
Author
Owner

@meggert0823 commented on GitHub (May 6, 2025):

This works for feet and meters, however if you do select kilometers or miles first (getting the error) then select meters it will fail with the same error.

Appreciate the quick response and confirmation that this is indeed an issue that needs to be resolved. It appears (at a quick glance) that this is a data validation check somewhere, but I haven't been able to check at the DB level or application, perhaps the owner of this issue can confirm and elaborate here.

Additionally, it would also be great if this distance value would be included in the total for a cable trace, as currently in my testing it does not and only includes the cable segments in the trace distance total.

@meggert0823 commented on GitHub (May 6, 2025): > This works for feet and meters, however if you do select kilometers or miles first (getting the error) then select meters it will fail with the same error. Appreciate the quick response and confirmation that this is indeed an issue that needs to be resolved. It appears (at a quick glance) that this is a data validation check somewhere, but I haven't been able to check at the DB level or application, perhaps the owner of this issue can confirm and elaborate here. Additionally, it would also be great if this distance value would be included in the total for a cable trace, as currently in my testing it does not and only includes the cable segments in the trace distance total.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11132