From 93d9aa845f85e89b0b7dcac99bc5167b90fe801a Mon Sep 17 00:00:00 2001 From: jasquat Date: Tue, 15 Nov 2022 17:38:37 -0500 Subject: [PATCH] pyl w/ burnettk --- .../services/process_instance_processor.py | 12 ++++++------ .../unit/test_spec_file_service.py | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) 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 440b8b554..be32a2f06 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -701,11 +701,11 @@ class ProcessInstanceProcessor: "bpmn_file_full_path_from_bpmn_process_identifier: bpmn_process_identifier is unexpectedly None" ) - spec_reference = SpecReferenceCache.query.filter_by( - identifier=bpmn_process_identifier - ).filter_by( - type='process' - ).first() + spec_reference = ( + SpecReferenceCache.query.filter_by(identifier=bpmn_process_identifier) + .filter_by(type="process") + .first() + ) bpmn_file_full_path = None if spec_reference is None: bpmn_file_full_path = ( @@ -1021,7 +1021,7 @@ class ProcessInstanceProcessor: spiff_logger = logging.getLogger("spiff") for handler in spiff_logger.handlers: if hasattr(handler, "bulk_insert_logs"): - handler.bulk_insert_logs() # type: ignoreidentifier + handler.bulk_insert_logs() # type: ignore db.session.commit() except WorkflowTaskExecException as we: diff --git a/spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_spec_file_service.py b/spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_spec_file_service.py index 81db11713..9f5c5f8a9 100644 --- a/spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_spec_file_service.py +++ b/spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_spec_file_service.py @@ -126,8 +126,7 @@ class TestSpecFileService(BaseTest): with_db_and_bpmn_file_cleanup: None, with_super_admin_user: UserModel, ) -> None: - """When a BPMN processes identifier is changed in a file, the old id - is removed from the cache.""" + """When a BPMN processes identifier is changed in a file, the old id is removed from the cache.""" old_identifier = "ye_old_identifier" process_id_lookup = SpecReferenceCache( identifier=old_identifier,