Add financial form prop to check if the missing TO is the only error

This commit is contained in:
Andrew Croce 2018-10-02 08:31:01 -04:00
parent fdedab817b
commit 8ac5a7e3b0

View File

@ -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):