diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py index 256cf060..b5dc6207 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py @@ -392,7 +392,7 @@ def process_data_show( ) -def _interstitial_stream(process_instance_id: int) -> Generator[str, str, None]: +def _interstitial_stream(process_instance_id: int) -> Generator[str, Optional[str], None]: process_instance = _find_process_instance_by_id_or_raise(process_instance_id) processor = ProcessInstanceProcessor(process_instance) reported_ids = [] # bit of an issue with end tasks showing as getting completed twice. diff --git a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py index 718fbde5..51a584c3 100644 --- a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py +++ b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py @@ -1694,7 +1694,8 @@ class TestProcessApi(BaseTest): # Rather that call the API and deal with the Server Side Events, call the loop directly and covert it to # a list. It tests all of our code. No reason to test Flasks SSE support. - results = list(_interstitial_stream(process_instance_id)) + stream_results = _interstitial_stream(process_instance_id) + results = list(stream_results) # strip the "data:" prefix and convert remaining string to dict. json_results = list(map(lambda x: json.loads(x[5:]), results)) # type: ignore # There should be 2 results back -