mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 12:37:20 +08:00
fix: add fast path
This commit is contained in:
parent
064075ab5f
commit
ed97dce06e
@ -86,16 +86,22 @@ class WorkflowAppService:
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
if created_by_account:
|
if created_by_account:
|
||||||
account = session.scalar(
|
account = session.scalar(select(Account).where(Account.email == created_by_account))
|
||||||
select(Account).where(Account.email == created_by_account)
|
if not account:
|
||||||
)
|
return {
|
||||||
account_id = account.id if account else None
|
"page": page,
|
||||||
|
"limit": limit,
|
||||||
|
"total": 0,
|
||||||
|
"has_more": False,
|
||||||
|
"data": [],
|
||||||
|
}
|
||||||
|
|
||||||
stmt = stmt.join(
|
stmt = stmt.join(
|
||||||
Account,
|
Account,
|
||||||
and_(
|
and_(
|
||||||
WorkflowAppLog.created_by == Account.id,
|
WorkflowAppLog.created_by == Account.id,
|
||||||
WorkflowAppLog.created_by_role == CreatorUserRole.ACCOUNT,
|
WorkflowAppLog.created_by_role == CreatorUserRole.ACCOUNT,
|
||||||
Account.id == account_id,
|
Account.id == account.id,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user