fix: check the image and run_command valid when select custom backend

This commit is contained in:
jialin
2025-11-23 18:51:01 +08:00
parent 2ecf83ddae
commit 782e81568d
4 changed files with 48 additions and 38 deletions
+9
View File
@@ -240,6 +240,15 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
...updateKVCacheConfig(val, option),
...updateGPUSelector(val)
});
const imageName = form.getFieldValue('image_name');
const runCommand = form.getFieldValue('run_command');
// if the image_name or run_command is empty, set them to default value of the backend
if (val === backendOptionsMap.custom && !imageName && !runCommand) {
return;
}
onBackendChange?.(val);
};