Fix llm vendor update bug
This commit is contained in:
@@ -79,6 +79,8 @@ def update_llm_model(id: str, data: LLMModelUpdate, db: Session = Depends(get_db
|
||||
raise HTTPException(status_code=404, detail="LLM Model not found")
|
||||
|
||||
update_data = data.model_dump(exclude_unset=True)
|
||||
if "type" in update_data and update_data["type"] is not None and hasattr(update_data["type"], "value"):
|
||||
update_data["type"] = update_data["type"].value
|
||||
for field, value in update_data.items():
|
||||
setattr(model, field, value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user