fix: db.session.query(TenantAccountJoin) (#19482)
This commit is contained in:
parent
af12cf1bf6
commit
b29087b680
3 changed files with 24 additions and 11 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue