fix: ci lint

This commit is contained in:
hj24 2025-10-13 13:47:50 +08:00
parent 150250454e
commit b4d412fead
2 changed files with 10 additions and 12 deletions

View File

@ -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())

View File

@ -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()