fix: Fix issue with update loadbalance error (#8829)

Refs #8809
This commit is contained in:
CityFun 2025-05-26 11:58:15 +08:00 committed by GitHub
parent 548929b2e8
commit 06d88219c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -210,6 +210,17 @@ const submit = async (formEl: FormInstance | undefined) => {
if (!valid) {
return;
}
for (const server of item.value.servers) {
if (!server.weight || server.weight == '') {
server.weight = 0;
}
if (!server.maxFails || server.maxFails == '') {
server.maxFails = 0;
}
if (!server.maxConns || server.maxConns == '') {
server.maxConns = 0;
}
}
loading.value = true;
try {
if (item.value.operate === 'edit') {