Hi,
I’ve come across with an unexpected behaviour when processing an inspection with numeric points that have tolerance limits defined.
In the check method, is checked that if the tolerance lower, for example, is greater than the point’s value, the inspection won’t be approved.
But there are some cases where that check, doesn’t get the correct result.
To reproduce you can define at the control a point with ‘numeric’ type and a tolerance lower of 2.12. Then in the inspection define 2.12 too.
When the inspection is processed, it will fail.
On the other hand, if you do the same but with the value 2.25, it will be approved.
That makes no sense, as in both cases the inspection should be approved.
After debugging, I realized that self.tolerance_lower is a ‘float’, while ‘value’ is a ‘Decimal’. This can lead to inconsistencies.
Thanks beforehand.