-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox Edition
NetBox Community
NetBox Version
4.4.7
Python Version
3.11
Steps to Reproduce
- Install NetBox 4.4.7
- Use pynetbox scripts to query sites and devices
- Run
sudo systemctl status netboxand observe the following warnings coinciding with the time that the pynetbox scripts are running
Nov 26 08:20:36 netbox gunicorn[742]: /opt/netbox/venv/lib/python3.11/site-packages/rest_framework/fields.py:992: UserWarning: min_value should be an integer or Decimal instance.
Nov 26 08:20:36 netbox gunicorn[742]: warnings.warn("min_value should be an integer or Decimal instance.")
Nov 26 08:25:07 netbox gunicorn[723]: /opt/netbox/venv/lib/python3.11/site-packages/rest_framework/fields.py:990: UserWarning: max_value should be an integer or Decimal instance.
Nov 26 08:25:07 netbox gunicorn[723]: warnings.warn("max_value should be an integer or Decimal instance.")
Nov 26 08:25:07 netbox gunicorn[723]: /opt/netbox/venv/lib/python3.11/site-packages/rest_framework/fields.py:992: UserWarning: min_value should be an integer or Decimal instance.
Nov 26 08:25:07 netbox gunicorn[723]: warnings.warn("min_value should be an integer or Decimal instance.")
Nov 26 08:40:13 netbox gunicorn[720]: /opt/netbox/venv/lib/python3.11/site-packages/rest_framework/fields.py:990: UserWarning: max_value should be an integer or Decimal instance.
Nov 26 08:40:13 netbox gunicorn[720]: warnings.warn("max_value should be an integer or Decimal instance.")
Nov 26 08:40:13 netbox gunicorn[720]: /opt/netbox/venv/lib/python3.11/site-packages/rest_framework/fields.py:992: UserWarning: min_value should be an integer or Decimal instance.
Nov 26 08:40:13 netbox gunicorn[720]: warnings.warn("min_value should be an integer or Decimal instance.")
I believe this is related to the following issue and PR. My research suggests that the values for MinValueValidator, MaxValueValidator may be interpreted as floats rather than decimals.
Expected Behavior
No warnings should appear when using pynetbox to query sites and devices
Observed Behavior
Nov 26 08:20:36 netbox gunicorn[742]: /opt/netbox/venv/lib/python3.11/site-packages/rest_framework/fields.py:992: UserWarning: min_value should be an integer or Decimal instance.
Nov 26 08:20:36 netbox gunicorn[742]: warnings.warn("min_value should be an integer or Decimal instance.")
Nov 26 08:25:07 netbox gunicorn[723]: /opt/netbox/venv/lib/python3.11/site-packages/rest_framework/fields.py:990: UserWarning: max_value should be an integer or Decimal instance.
Nov 26 08:25:07 netbox gunicorn[723]: warnings.warn("max_value should be an integer or Decimal instance.")
Nov 26 08:25:07 netbox gunicorn[723]: /opt/netbox/venv/lib/python3.11/site-packages/rest_framework/fields.py:992: UserWarning: min_value should be an integer or Decimal instance.
Nov 26 08:25:07 netbox gunicorn[723]: warnings.warn("min_value should be an integer or Decimal instance.")
Nov 26 08:40:13 netbox gunicorn[720]: /opt/netbox/venv/lib/python3.11/site-packages/rest_framework/fields.py:990: UserWarning: max_value should be an integer or Decimal instance.
Nov 26 08:40:13 netbox gunicorn[720]: warnings.warn("max_value should be an integer or Decimal instance.")
Nov 26 08:40:13 netbox gunicorn[720]: /opt/netbox/venv/lib/python3.11/site-packages/rest_framework/fields.py:992: UserWarning: min_value should be an integer or Decimal instance.
Nov 26 08:40:13 netbox gunicorn[720]: warnings.warn("min_value should be an integer or Decimal instance.")
Metadata
Metadata
Assignees
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application