don't overwrite the current user variable (passed as an argument to the function) with the initiator these values should be kept separate.

This commit is contained in:
Dan 2023-03-16 11:07:56 -04:00
parent 4ae54958c9
commit c565491936
1 changed files with 3 additions and 3 deletions

View File

@ -404,10 +404,10 @@ class ProcessInstanceReportService:
) )
if report_filter.process_initiator_username is not None: if report_filter.process_initiator_username is not None:
user = UserModel.query.filter_by(username=report_filter.process_initiator_username).first() initiator = UserModel.query.filter_by(username=report_filter.process_initiator_username).first()
process_initiator_id = -1 process_initiator_id = -1
if user: if initiator:
process_initiator_id = user.id process_initiator_id = initiator.id
process_instance_query = process_instance_query.filter_by(process_initiator_id=process_initiator_id) process_instance_query = process_instance_query.filter_by(process_initiator_id=process_initiator_id)
if ( if (