fix custom model delete exception

This commit is contained in:
hjlarry 2025-08-19 16:08:18 +08:00
parent 4caf52de8c
commit 416b2634ed
1 changed files with 1 additions and 1 deletions

View File

@ -979,7 +979,7 @@ class ProviderConfiguration(BaseModel):
lb_config.enabled = False
lb_config.name = "__delete__"
lb_config.updated_at = datetime.datetime.now(datetime.UTC).replace(tzinfo=None)
db.session.add(lb_config)
session.add(lb_config)
# Check if this is the currently active credential
provider_model_record = self._get_custom_model_record(model_type, model, session=session)