Move classified/unclassified check into its own method
This commit is contained in:
parent
3d80135606
commit
6d61839c65
@ -94,10 +94,7 @@ class TaskOrders(object):
|
||||
|
||||
@classmethod
|
||||
def is_section_complete(cls, task_order, section):
|
||||
sections = TaskOrders.SECTIONS
|
||||
if not app.config.get("CLASSIFIED"):
|
||||
sections["funding"] = TaskOrders.UNCLASSIFIED_FUNDING
|
||||
if section in sections:
|
||||
if section in TaskOrders.sections():
|
||||
for attr in TaskOrders.SECTIONS[section]:
|
||||
if getattr(task_order, attr) is None:
|
||||
return False
|
||||
@ -115,6 +112,13 @@ class TaskOrders(object):
|
||||
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def sections(cls):
|
||||
section_list = TaskOrders.SECTIONS
|
||||
if not app.config.get("CLASSIFIED"):
|
||||
section_list["funding"] = TaskOrders.UNCLASSIFIED_FUNDING
|
||||
return section_list
|
||||
|
||||
OFFICERS = [
|
||||
"contracting_officer",
|
||||
"contracting_officer_representative",
|
||||
|
Loading…
x
Reference in New Issue
Block a user