mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-06-04 11:14:10 +08:00
fix: ensure WorkflowRun attributes are refreshed in WorkflowCycleMana… (#11913)
This commit is contained in:
parent
de8800f41a
commit
786cb6859b
@ -505,6 +505,12 @@ class WorkflowCycleManage:
|
|||||||
:param workflow_run: workflow run
|
:param workflow_run: workflow run
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
# Attach WorkflowRun to an active session so "created_by_role" can be accessed.
|
||||||
|
workflow_run = db.session.merge(workflow_run)
|
||||||
|
|
||||||
|
# Refresh to ensure any expired attributes are fully loaded
|
||||||
|
db.session.refresh(workflow_run)
|
||||||
|
|
||||||
created_by = None
|
created_by = None
|
||||||
if workflow_run.created_by_role == CreatedByRole.ACCOUNT.value:
|
if workflow_run.created_by_role == CreatedByRole.ACCOUNT.value:
|
||||||
created_by_account = workflow_run.created_by_account
|
created_by_account = workflow_run.created_by_account
|
||||||
|
Loading…
x
Reference in New Issue
Block a user