Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

fix: block command field changes for python engine #2007

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions engine/controllers/models.cc
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ void Models::UpdateModel(const HttpRequestPtr& req,
message = "Successfully update model ID '" + model_id +
"': " + json_body.toStyledString();
} else if (model_config.engine == kPythonEngine) {
// Block changes to `command`
if (json_body.isMember("command")) {
json_body.removeMember("command");
}
config::PythonModelConfig python_model_config;
python_model_config.ReadFromYaml(yaml_fp.string());
python_model_config.FromJson(json_body);
Expand Down
Loading