Move max clin amount to a constant
This commit is contained in:
parent
ebe8adac21
commit
e9bd1b596d
@ -18,6 +18,8 @@ from .forms import BaseForm
|
|||||||
from atst.utils.localization import translate
|
from atst.utils.localization import translate
|
||||||
from flask import current_app as app
|
from flask import current_app as app
|
||||||
|
|
||||||
|
MAX_CLIN_AMOUNT = 1000000000
|
||||||
|
|
||||||
|
|
||||||
def coerce_enum(enum_inst):
|
def coerce_enum(enum_inst):
|
||||||
if getattr(enum_inst, "value", None):
|
if getattr(enum_inst, "value", None):
|
||||||
@ -53,7 +55,7 @@ class CLINForm(FlaskForm):
|
|||||||
validators=[
|
validators=[
|
||||||
NumberRange(
|
NumberRange(
|
||||||
0,
|
0,
|
||||||
1000000000,
|
MAX_CLIN_AMOUNT,
|
||||||
translate("forms.task_order.clin_funding_errors.funding_range_error"),
|
translate("forms.task_order.clin_funding_errors.funding_range_error"),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -63,7 +65,7 @@ class CLINForm(FlaskForm):
|
|||||||
validators=[
|
validators=[
|
||||||
NumberRange(
|
NumberRange(
|
||||||
0,
|
0,
|
||||||
1000000000,
|
MAX_CLIN_AMOUNT,
|
||||||
translate("forms.task_order.clin_funding_errors.funding_range_error"),
|
translate("forms.task_order.clin_funding_errors.funding_range_error"),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user