mirror of
https://github.com/langgenius/dify.git
synced 2026-05-10 05:56:31 +08:00
When account_integrates has no record, the email fallback path used
sessionmaker(db.engine).begin() which auto-commits on exit, expiring
all attributes on the Account object. Subsequent access to account.id
in get_join_tenants raises DetachedInstanceError.
Remove the independent session wrapper and let
get_account_by_email_with_case_fallback use db.session (request-scoped)
so the returned Account stays attached.
Cherry-picked from
|
||
|---|---|---|
| .. | ||
| common | ||
| console | ||
| files | ||
| inner_api | ||
| mcp | ||
| service_api | ||
| trigger | ||
| web | ||
| __init__.py | ||
| fastopenapi.py | ||