expect CLIN data with no commas from the financial verification form

This commit is contained in:
dandds
2018-08-23 10:11:00 -04:00
parent 40320baf10
commit e30d4e238c
2 changed files with 15 additions and 17 deletions

View File

@@ -68,11 +68,9 @@ def validate_task_order_number(field):
return True
def formatted_number_to_int(num):
if not num:
return
else:
return int(num.replace(",",""))
def number_to_int(num):
if num:
return int(num)
class BaseFinancialForm(ValidatedForm):
@@ -171,40 +169,40 @@ class ExtendedFinancialForm(BaseFinancialForm):
"<dl><dt>CLIN 0001</dt> - <dd>Unclassified IaaS and PaaS Amount</dd></dl>",
validators=[Required()],
description="Review your task order document, the amounts for each CLIN must match exactly here",
filters=[formatted_number_to_int]
filters=[number_to_int]
)
clin_0003 = StringField(
"<dl><dt>CLIN 0003</dt> - <dd>Unclassified Cloud Support Package</dd></dl>",
validators=[Required()],
description="Review your task order document, the amounts for each CLIN must match exactly here",
filters=[formatted_number_to_int]
filters=[number_to_int]
)
clin_1001 = StringField(
"<dl><dt>CLIN 1001</dt> - <dd>Unclassified IaaS and PaaS Amount <br> OPTION PERIOD 1</dd></dl>",
validators=[Required()],
description="Review your task order document, the amounts for each CLIN must match exactly here",
filters=[formatted_number_to_int]
filters=[number_to_int]
)
clin_1003 = StringField(
"<dl><dt>CLIN 1003</dt> - <dd>Unclassified Cloud Support Package <br> OPTION PERIOD 1</dd></dl>",
validators=[Required()],
description="Review your task order document, the amounts for each CLIN must match exactly here",
filters=[formatted_number_to_int]
filters=[number_to_int]
)
clin_2001 = StringField(
"<dl><dt>CLIN 2001</dt> - <dd>Unclassified IaaS and PaaS Amount <br> OPTION PERIOD 2</dd></dl>",
validators=[Required()],
description="Review your task order document, the amounts for each CLIN must match exactly here",
filters=[formatted_number_to_int]
filters=[number_to_int]
)
clin_2003 = StringField(
"<dl><dt>CLIN 2003</dt> - <dd>Unclassified Cloud Support Package <br> OPTION PERIOD 2</dd></dl>",
validators=[Required()],
description="Review your task order document, the amounts for each CLIN must match exactly here",
filters=[formatted_number_to_int]
filters=[number_to_int]
)