exclude instances you started in with_tasks_completed_by_me

This commit is contained in:
burnettk 2022-11-25 01:57:51 -05:00
parent 382f575dab
commit e6b2f5d1ca
1 changed files with 5 additions and 0 deletions

View File

@ -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,