Fixes #19896: cf minmax mustbe int #1371

Closed
opened 2026-04-06 00:14:53 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Jathn on 8/29/2025

Fixes #19896: Allow decimal number boundaries for custom fields

The changes made allows storing decimal values as boundary values for custom fields. This fixes the previous bug that caused values to be stored as whole numbers.

Changes made:

  • Changes customfields model to use models.DecimalField to store validation_maximum and validation_minimum
  • Changes customfields filterset to use forms.DecimalField for respective fields
  • Database migration 0130 in extras application to allow above changes
*Originally created by @Jathn on 8/29/2025* <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes #19896: Allow decimal number boundaries for custom fields <!-- Please include a summary of the proposed changes below. --> The changes made allows storing decimal values as boundary values for custom fields. This fixes the previous bug that caused values to be stored as whole numbers. Changes made: - Changes customfields model to use models.DecimalField to store validation_maximum and validation_minimum - Changes customfields filterset to use forms.DecimalField for respective fields - Database migration 0130 in extras application to allow above changes
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#1371