FAI-CIVL / FAI-Airscore

AirScore - online paragliding / hanggliding GAP-based scoring software.
https://airscore.cc/
GNU General Public License v3.0
13 stars 17 forks source link

Empty the field, Minimum turnpoint tolerance. #229

Closed philderbeast closed 3 years ago

philderbeast commented 3 years ago

If in the competition formula if I make an edit so that there is no value in "Minimum turnpoint tolerance (m)", an empty string, then please take that to mean a value of zero. I get this error if I try:

Minimum turnpoint tolerance (m) (None): Not a valid integer value
kuaka commented 3 years ago

you can simply set to zero. This is standard behavior for an integer field in the form library that we use. We can override it and accept a blank then force the blank to be a zero in the code (in which case you will see a zero upon page refresh as that is what will be saved to the database). For consistency we would need to do this to every integer field in airScore.

I don't think it is too much to ask the user to put zero in when they mean zero. There is a message after all that tells them what is wrong.

philderbeast commented 3 years ago

For this setting, a zero absolute minimum is the same as not doing the minimum check, the same as doing nothing, a "None" action. For this setting having no value does make sense but I'm not going to push for this. I raised the issue because to me it felt more natural to delete the value 5 than it did to set it to 0.