mirror of https://github.com/langgenius/dify.git
fix: ci lint
This commit is contained in:
parent
150250454e
commit
b4d412fead
|
|
@ -89,17 +89,15 @@ class WorkflowAppService:
|
|||
account = session.scalar(
|
||||
select(Account).where(Account.email == created_by_account)
|
||||
)
|
||||
if account:
|
||||
stmt = stmt.join(
|
||||
Account,
|
||||
and_(
|
||||
WorkflowAppLog.created_by == Account.id,
|
||||
WorkflowAppLog.created_by_role == CreatorUserRole.ACCOUNT,
|
||||
Account.id == account.id,
|
||||
),
|
||||
)
|
||||
else:
|
||||
stmt = stmt.where(False)
|
||||
account_id = account.id if account else None
|
||||
stmt = stmt.join(
|
||||
Account,
|
||||
and_(
|
||||
WorkflowAppLog.created_by == Account.id,
|
||||
WorkflowAppLog.created_by_role == CreatorUserRole.ACCOUNT,
|
||||
Account.id == account_id,
|
||||
),
|
||||
)
|
||||
|
||||
stmt = stmt.order_by(WorkflowAppLog.created_at.desc())
|
||||
|
||||
|
|
|
|||
|
|
@ -826,7 +826,7 @@ class TestWorkflowAppService:
|
|||
page=1,
|
||||
limit=20
|
||||
)
|
||||
assert result_with_old_email["total"] == 0
|
||||
assert result_with_unknown_email["total"] == 0
|
||||
|
||||
account.email = original_email
|
||||
db_session_with_containers.commit()
|
||||
|
|
|
|||
Loading…
Reference in New Issue