Skip to content

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

@meggert0823

Description

@meggert0823

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

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions