-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fixes #19896: cf minmax mustbe int #20207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #19896: cf minmax mustbe int #20207
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The min/max is different then the decimal field definition also I think larger then integer could be 12 seems excessive I think 10 (non decimal) places works for max integer 2147483647, wondering if 16 max and 4 decimal would work better here?
field = forms.DecimalField(
required=required,
initial=initial,
max_digits=12,
decimal_places=4,
min_value=self.validation_minimum,
max_value=self.validation_maximum
)
I agree. I originally looked mainly at the storage and that it was a BigIntegerField, however to my understanding it seems only Integers could be entered anyway. Please see new changes:
Edit: added note about migrations |
Thanks @Jathn ! |
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: