Migrate SQLAlchemy from 1.x to 2.0 with automated and manual adjustments (#23224)

Co-authored-by: Yongtao Huang <99629139+hyongtao-db@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Yongtao Huang 2025-09-02 10:30:19 +08:00 • committed by GitHub
commit be3af1e234
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 226 additions and 260 deletions

View file

@ -74,6 +74,7 @@ class AdvancedChatAppRunner(WorkflowBasedAppRunner):
with Session(db.engine, expire_on_commit=False) as session:
app_record = session.scalar(select(App).where(App.id == app_config.app_id))
if not app_record:
raise ValueError("App not found")