From be250eb6d4f00d2ec334183b0fceba4026dc0a35 Mon Sep 17 00:00:00 2001 From: burnettk Date: Thu, 3 Nov 2022 16:23:15 -0400 Subject: [PATCH] work around parser.get_process_dependencies returning a set containing the element None --- .../src/spiffworkflow_backend/scripts/get_current_user.py | 4 ++-- .../src/spiffworkflow_backend/scripts/get_process_info.py | 2 +- .../services/process_instance_processor.py | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_current_user.py b/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_current_user.py index b8c314c0e..a1a1b47e9 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_current_user.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_current_user.py @@ -9,8 +9,8 @@ from spiffworkflow_backend.models.script_attributes_context import ( from spiffworkflow_backend.scripts.script import Script -class GetUser(Script): - """GetUser.""" +class GetCurrentUser(Script): + """GetCurrentUser.""" def get_description(self) -> str: """Get_description.""" diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_process_info.py b/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_process_info.py index b8ad3d687..45c70d6ba 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_process_info.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_process_info.py @@ -8,7 +8,7 @@ from spiffworkflow_backend.scripts.script import Script class GetProcessInfo(Script): - """GetUser.""" + """GetProcessInfo.""" def get_description(self) -> str: """Get_description.""" diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py index 0795bc365..dd80aa85a 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -732,6 +732,10 @@ class ProcessInstanceProcessor: if processed_identifiers is None: processed_identifiers = set() processor_dependencies = parser.get_process_dependencies() + + # since get_process_dependencies() returns a set with None sometimes, we need to remove it + processor_dependencies = processor_dependencies - {None} + processor_dependencies_new = processor_dependencies - processed_identifiers bpmn_process_identifiers_in_parser = parser.get_process_ids()