Incorrect rounding in Custom Constraint
example
#941
Labels
bug
Something isn't working
documentation
Docs, user guides or API
feature:constraints
Related to inputting rules or business logic
Milestone
If I follow the exact code in the Custom Constraint User Guide, the resulting constraint doesn't work as intended -- it never produces employees that are not constractors.
The issue is in the
reverse_transform
method. Instead ofround(2)
the code should beround()
.i.e. change this line
Further Context
In previous versions of the docs, we were multiplying by the increment first. Now, we are multiplying by the increment last. Therefore, it is necessary to round to the nearest whole number instead of 2 digits.
The text was updated successfully, but these errors were encountered: