fix type coercion special case where dollars = 0
This commit is contained in:
parent
80802370a3
commit
2bb335bcfb
@ -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}")
|
||||
|
Loading…
Reference in New Issue
Block a user