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
|
@classmethod
|
||||||
def is_section_complete(cls, task_order, section):
|
def is_section_complete(cls, task_order, section):
|
||||||
sections = TaskOrders.SECTIONS
|
if section in TaskOrders.sections():
|
||||||
if not app.config.get("CLASSIFIED"):
|
|
||||||
sections["funding"] = TaskOrders.UNCLASSIFIED_FUNDING
|
|
||||||
if section in sections:
|
|
||||||
for attr in TaskOrders.SECTIONS[section]:
|
for attr in TaskOrders.SECTIONS[section]:
|
||||||
if getattr(task_order, attr) is None:
|
if getattr(task_order, attr) is None:
|
||||||
return False
|
return False
|
||||||
@ -115,6 +112,13 @@ class TaskOrders(object):
|
|||||||
|
|
||||||
return True
|
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 = [
|
OFFICERS = [
|
||||||
"contracting_officer",
|
"contracting_officer",
|
||||||
"contracting_officer_representative",
|
"contracting_officer_representative",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user