chore: all model.query replace to db.session.query (#19521)

This commit is contained in:
非法操作 2025-05-12 15:19:41 +08:00 committed by GitHub
commit 14cd71ed0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 99 additions and 67 deletions

View file

@ -45,7 +45,7 @@ def mail_clean_document_notify_task():
if plan != "sandbox":
knowledge_details = []
# check tenant
tenant = Tenant.query.filter(Tenant.id == tenant_id).first()
tenant = db.session.query(Tenant).filter(Tenant.id == tenant_id).first()
if not tenant:
continue
# check current owner