From 26946b2461fcbd043157dd4e2e50d60fec9ec827 Mon Sep 17 00:00:00 2001 From: Arthur Date: Wed, 28 Sep 2022 16:13:22 -0700 Subject: [PATCH] 10348 add documentation --- docs/customization/custom-fields.md | 1 + netbox/extras/models/customfields.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/customization/custom-fields.md b/docs/customization/custom-fields.md index c443fa9f6..81aaa5247 100644 --- a/docs/customization/custom-fields.md +++ b/docs/customization/custom-fields.md @@ -13,6 +13,7 @@ Custom fields may be created by navigating to Customization > Custom Fields. Net * Text: Free-form text (intended for single-line use) * Long text: Free-form of any length; supports Markdown rendering * Integer: A whole number (positive or negative) +* Decimal: A fixed-precision decimal number (4 decimal places) * Boolean: True or false * Date: A date in ISO 8601 format (YYYY-MM-DD) * URL: This will be presented as a link in the web UI diff --git a/netbox/extras/models/customfields.py b/netbox/extras/models/customfields.py index 56cbf6b4e..54b751a51 100644 --- a/netbox/extras/models/customfields.py +++ b/netbox/extras/models/customfields.py @@ -323,8 +323,8 @@ class CustomField(CloningMixin, ExportTemplatesMixin, WebhooksMixin, ChangeLogge field = forms.DecimalField( required=required, initial=initial, - max_digits=10, - decimal_places=2, + max_digits=12, + decimal_places=4, ) # Boolean