fixed mypy issue

This commit is contained in:
jasquat 2022-07-25 14:58:06 -04:00
parent ab2e73011b
commit f6ba35c02e
2 changed files with 4 additions and 9 deletions

View File

@ -113,9 +113,6 @@ class Task:
process_instance_id: int | None = None, process_instance_id: int | None = None,
form_schema: str | None = None, form_schema: str | None = None,
form_ui_schema: str | None = None, form_ui_schema: str | None = None,
# preceding_spiffworkflow_user_task_id: Union[str, int, None] = None,
# following_spiffworkflow_user_task_id: Union[str, int, None] = None,
# current_active_task_id: Union[int, None] = None,
): ):
"""__init__.""" """__init__."""
self.id = id self.id = id
@ -134,9 +131,6 @@ class Task:
self.process_instance_id = process_instance_id self.process_instance_id = process_instance_id
self.form_schema = form_schema self.form_schema = form_schema
self.form_ui_schema = form_ui_schema self.form_ui_schema = form_ui_schema
# self.preceding_spiffworkflow_user_task_id = preceding_spiffworkflow_user_task_id
# self.following_spiffworkflow_user_task_id = following_spiffworkflow_user_task_id
# self.current_active_task_id = current_active_task_id
self.multi_instance_type = ( self.multi_instance_type = (
multi_instance_type # Some tasks have a repeat behavior. multi_instance_type # Some tasks have a repeat behavior.
@ -278,9 +272,6 @@ class TaskSchema(Schema):
"process_instance_id", "process_instance_id",
"form_schema", "form_schema",
"form_ui_schema", "form_ui_schema",
# "preceding_spiffworkflow_user_task_id",
# "following_spiffworkflow_user_task_id",
# "current_active_task_id",
] ]
multi_instance_type = EnumField(MultiInstanceType) multi_instance_type = EnumField(MultiInstanceType)

View File

@ -150,6 +150,10 @@ class Script:
def add_data_to_task(self, task: Task, data: Any) -> None: def add_data_to_task(self, task: Task, data: Any) -> None:
"""Add_data_to_task.""" """Add_data_to_task."""
key = self.__class__.__name__ key = self.__class__.__name__
if task.data is None:
task.data = {}
if key in task.data: if key in task.data:
task.data[key].update(data) task.data[key].update(data)
else: else: