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

This commit is contained in:
crazywoola authored and GitHub committed 2025-05-10 04:43:56 -07:00
1 parent af12cf1bf6
commit b29087b680
3 files changed
+24 -11

No files matched your search

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