ZcashFoundation / zcash-grant-system

The Zcash Foundation Grant System
https://grants.zfnd.org
MIT License
11 stars 8 forks source link

Default target to '0' #413

Closed wbobeirne closed 5 years ago

wbobeirne commented 5 years ago

Closes #390.

What This Does

Defaults target to '0' instead of None due to db not-null constraint, and the use of Decimal everywhere throwing on empty string. Also adds some frontend validation to avoid users attempting to submit with '0' (It would error on the backend, but no warning on the frontend.)

Had to do a little hack to not show an error immediately on the basics screen since it defaults to an invalid value, but I think it's a pretty minor sin.