diff --git a/atst/forms/financial.py b/atst/forms/financial.py index f7aa76a6..2db90e5f 100644 --- a/atst/forms/financial.py +++ b/atst/forms/financial.py @@ -63,6 +63,12 @@ class FinancialForm(ValidatedForm): self.funding_type_other.validators.append(Required()) return super().validate(*args, **kwargs) + def reset(self): + """ + Reset UII info so that it can be de-parsed rendered properly. + This is a stupid workaround, and there's probably a better way. + """ + self.uii_ids.process_data(self.uii_ids.data) def perform_extra_validation(self, existing_request): valid = True diff --git a/atst/routes/requests/financial_verification.py b/atst/routes/requests/financial_verification.py index 2a92b938..966a9680 100644 --- a/atst/routes/requests/financial_verification.py +++ b/atst/routes/requests/financial_verification.py @@ -32,12 +32,12 @@ def update_financial_verification(request_id): if valid: return redirect(url_for("requests.financial_verification_submitted")) else: - # TODO: This is a horrible workaround. - form.uii_ids.process_data(form.uii_ids.data) + form.reset() return render_template( "requests/financial_verification.html", **rerender_args ) else: + form.reset() return render_template("requests/financial_verification.html", **rerender_args)