fix: db.session.query(TenantAccountJoin) (#19482)

This commit is contained in:
crazywoola
2025-05-10 19:43:56 +08:00
committed by GitHub
parent af12cf1bf6
commit b29087b680
3 changed files with 24 additions and 11 deletions

View File

@@ -47,7 +47,9 @@ def mail_clean_document_notify_task():
if not tenant:
continue
# check current owner
current_owner_join = TenantAccountJoin.query.filter_by(tenant_id=tenant.id, role="owner").first()
current_owner_join = (
db.session.query(TenantAccountJoin).filter_by(tenant_id=tenant.id, role="owner").first()
)
if not current_owner_join:
continue
account = Account.query.filter(Account.id == current_owner_join.account_id).first()