diff --git a/docs/release-notes/version-3.5.md b/docs/release-notes/version-3.5.md index 957b5fa84..8eeeebf10 100644 --- a/docs/release-notes/version-3.5.md +++ b/docs/release-notes/version-3.5.md @@ -25,6 +25,7 @@ * [#12742](https://github.com/netbox-community/netbox/issues/12742) - Object counts dashboard widget should support URL-compatible query filters * [#12762](https://github.com/netbox-community/netbox/issues/12762) - Fix GraphiQL UI by reverting graphene-django to earlier version * [#12745](https://github.com/netbox-community/netbox/issues/12745) - Escape display text in API-backed selection widgets +* [#12779](https://github.com/netbox-community/netbox/issues/12779) - Correct arithmetic for converting inches to meters --- diff --git a/netbox/utilities/utils.py b/netbox/utilities/utils.py index b1504e62f..4b4a2631a 100644 --- a/netbox/utilities/utils.py +++ b/netbox/utilities/utils.py @@ -302,7 +302,7 @@ def to_meters(length, unit): if unit == CableLengthUnitChoices.UNIT_FOOT: return length * Decimal(0.3048) if unit == CableLengthUnitChoices.UNIT_INCH: - return length * Decimal(0.3048) * 12 + return length * Decimal(0.0254) raise ValueError(f"Unknown unit {unit}. Must be 'km', 'm', 'cm', 'mi', 'ft', or 'in'.")