-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Min value should be Decimal #15413
Min value should be Decimal #15413
Conversation
Quality Gate passedIssues Measures |
@@ -160,7 +160,7 @@ def __str__(self): | |||
default=100, | |||
editable=False, | |||
) | |||
capacity_adjustment = models.DecimalField(default=Decimal(1.0), max_digits=3, decimal_places=2, validators=[MinValueValidator(0)]) | |||
capacity_adjustment = models.DecimalField(default=Decimal(1.0), max_digits=3, decimal_places=2, validators=[MinValueValidator(Decimal(0.0))]) |
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.
Does this not require a new migration file?
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.
bash-5.1$ awx-manage makemigrations
No changes detected
Does not appear so
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.
Don't think it actually changes the datatype, but rather validator function in Django
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.
validators had some weird place in both the fields and the model Meta. Weird but possible.
ba37d71
to
80c179d
Compare
A test could be nice too. |
20a1df2
to
9ee487d
Compare
Quality Gate passedIssues Measures |
This hopefully resolves error message seen in logs sometimes about "should be Decimal type"
9ee487d
to
2e9a9aa
Compare
Quality Gate passedIssues Measures |
This hopefully resolves error message seen in logs sometimes about "should be Decimal type"
ISSUE TYPE
COMPONENT NAME