From 2e98ff22407ca00276effa434a76436c2630ca7f Mon Sep 17 00:00:00 2001 From: richard-dds Date: Tue, 23 Oct 2018 14:46:53 -0400 Subject: [PATCH] Apply PENumber error message --- atst/domain/requests/financial_verification.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atst/domain/requests/financial_verification.py b/atst/domain/requests/financial_verification.py index 380b53e4..c61e309e 100644 --- a/atst/domain/requests/financial_verification.py +++ b/atst/domain/requests/financial_verification.py @@ -27,6 +27,7 @@ class PENumberValidator(object): try: PENumbers.get(field.data) except NotFoundError: + self._apply_error(field) return False return True @@ -50,7 +51,7 @@ class PENumberValidator(object): return request.pe_number == pe_id def _apply_error(self, field): - suggestion = self.pe_validator.suggest_pe_id(field.data) + suggestion = self.suggest_pe_id(field.data) error_str = ( "We couldn't find that PE number. {}" "If you have double checked it you can submit anyway. "