From e6b2f5d1caadbc90f1e4888853feeb715c69b9d2 Mon Sep 17 00:00:00 2001 From: burnettk Date: Fri, 25 Nov 2022 01:57:51 -0500 Subject: [PATCH] exclude instances you started in with_tasks_completed_by_me --- .../spiffworkflow_backend/routes/process_api_blueprint.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py index f0cdb992d..37524a5a9 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py @@ -868,6 +868,11 @@ def process_instance_list( process_instance_query = process_instance_query.filter( ProcessInstanceModel.status.in_(["complete", "error", "terminated"]) # type: ignore ) + # process_instance_query = process_instance_query.join(UserModel, UserModel.id == ProcessInstanceModel.process_initiator_id).add_columns(UserModel.username) + # search for process_instance.UserModel.username in this file for more details about why adding columns is annoying. + process_instance_query = process_instance_query.filter( + ProcessInstanceModel.process_initiator_id != g.user.id + ) process_instance_query = process_instance_query.join( SpiffStepDetailsModel, ProcessInstanceModel.id == SpiffStepDetailsModel.process_instance_id,