From 8ac5a7e3b04250734c647a8ea680f3f5efdf1cc5 Mon Sep 17 00:00:00 2001 From: Andrew Croce Date: Tue, 2 Oct 2018 08:31:01 -0400 Subject: [PATCH] Add financial form prop to check if the missing TO is the only error --- atst/forms/financial.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/atst/forms/financial.py b/atst/forms/financial.py index 9522ec12..0a081695 100644 --- a/atst/forms/financial.py +++ b/atst/forms/financial.py @@ -151,6 +151,11 @@ class FinancialForm(BaseFinancialForm): def is_missing_task_order_number(self): return "task_order_number" in self.errors + @property + def is_only_missing_task_order_number(self): + return "task_order_number" in self.errors and len(self.errors) == 1 + + class ExtendedFinancialForm(BaseFinancialForm): def validate(self, *args, **kwargs):