mypy cleanup

removed until we decide how to deal with forms
This commit is contained in:
mike cullerton 2022-06-30 11:52:56 -04:00
parent 6e0e7b847f
commit 8b5306a562
1 changed files with 23 additions and 23 deletions

View File

@ -416,29 +416,29 @@ class ProcessInstanceService:
properties=props,
)
# Only process the form and documentation if requested.
# The task should be in a completed or a ready state, and should
# not be a previously completed MI Task.
if add_docs_and_forms:
task.data = spiff_task.data
if (
hasattr(spiff_task.task_spec, "form")
and spiff_task.task_spec.form is not None
):
task.form = spiff_task.task_spec.form
for i, field in enumerate(task.form.fields):
task.form.fields[i] = ProcessInstanceService.process_options(
spiff_task, field
)
# If there is a default value, set it.
# if field.id not in task.data and ProcessInstanceService.get_default_value(field, spiff_task) is not None:
# task.data[field.id] = ProcessInstanceService.get_default_value(field, spiff_task)
# task.documentation = ProcessInstanceService._process_documentation(spiff_task)
task.documentation = (
spiff_task.task_spec.documentation
if hasattr(spiff_task.task_spec, "documentation")
else None
)
# # Only process the form and documentation if requested.
# # The task should be in a completed or a ready state, and should
# # not be a previously completed MI Task.
# if add_docs_and_forms:
# task.data = spiff_task.data
# if (
# hasattr(spiff_task.task_spec, "form")
# and spiff_task.task_spec.form is not None
# ):
# task.form = spiff_task.task_spec.form
# for i, field in enumerate(task.form.fields):
# task.form.fields[i] = ProcessInstanceService.process_options(
# spiff_task, field
# )
# # If there is a default value, set it.
# # if field.id not in task.data and ProcessInstanceService.get_default_value(field, spiff_task) is not None:
# # task.data[field.id] = ProcessInstanceService.get_default_value(field, spiff_task)
# # task.documentation = ProcessInstanceService._process_documentation(spiff_task)
# task.documentation = (
# spiff_task.task_spec.documentation
# if hasattr(spiff_task.task_spec, "documentation")
# else None
# )
# All ready tasks should have a valid name, and this can be computed for
# some tasks, particularly multi-instance tasks that all have the same spec