fix type coercion special case where dollars = 0

This commit is contained in:
forest 2021-12-14 01:47:45 -06:00
parent 80802370a3
commit 2bb335bcfb
1 changed files with 2 additions and 2 deletions

View File

@ -39,9 +39,9 @@ def validate_dollars(min: float, max: float):
#current_app.logger.info(f"{str(dollars)} {str(min)} {str(dollars < min)}")
if dollars and dollars < min:
if dollars is not None and dollars < min:
errors.append(f"dollars must be {format(min, '.2f')} or more")
elif dollars and dollars >= max:
elif dollars is not None and dollars >= max:
errors.append(f"dollars must be less than {format(max, '.2f')}")
current_app.logger.info(f"{len(errors)} {errors}")