DD-254 domain class and method for checking if DD-254 is complete
This commit is contained in:
@@ -4,6 +4,7 @@ from flask import current_app as app
|
||||
from atst.database import db
|
||||
from atst.models.task_order import TaskOrder
|
||||
from atst.models.permissions import Permissions
|
||||
from atst.models.dd_254 import DD254
|
||||
from atst.domain.portfolios import Portfolios
|
||||
from atst.domain.authz import Authorization
|
||||
from .exceptions import NotFoundError
|
||||
@@ -171,3 +172,15 @@ class TaskOrders(object):
|
||||
raise TaskOrderError(
|
||||
"{} is not an officer role on task orders".format(officer_type)
|
||||
)
|
||||
|
||||
|
||||
class DD254s:
|
||||
# TODO: standin implementation until we have a real download,
|
||||
# sign, and verify process for the DD 254 PDF
|
||||
@classmethod
|
||||
def complete(cls, dd254):
|
||||
for col in DD254.__table__.columns:
|
||||
if getattr(dd254, col.name) is None:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
Reference in New Issue
Block a user