fix: update session management in BuiltinToolManageService to use no_autoflush

This commit is contained in:
Harry
2025-08-15 11:24:58 +08:00
parent 0baccb9e82
commit 715a7fc19f

View File

@ -604,7 +604,7 @@ class BuiltinToolManageService:
1.if the default provider exists, return the default provider
2.if the default provider does not exist, return the oldest provider
"""
with Session(db.engine) as session:
with Session(db.engine).no_autoflush as session:
try:
full_provider_name = provider_name
provider_id_entity = ToolProviderID(provider_name)