Add check to see if KO can sign the TO and update tests

This commit is contained in:
leigh-mil
2019-03-07 16:15:03 -05:00
parent 6720b60bc4
commit 521d98562b
5 changed files with 59 additions and 7 deletions

View File

@@ -120,6 +120,14 @@ class TaskOrders(object):
return True
@classmethod
def can_ko_sign(cls, task_order):
return (
TaskOrders.all_sections_complete(task_order)
and DD254s.is_complete(task_order.dd_254)
and not TaskOrders.is_signed_by_ko(task_order)
)
@classmethod
def is_signed_by_ko(cls, task_order):
return task_order.signer_dod_id is not None