mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
FIX: Pipeline save settings - Handle undefined valves property (#19791)
### FIX: Pipeline save settings - Handle undefined valves property When a Pipeline valve have a null value the settings isn't saved. The error occurs because the code tries to call `.split()` on a `null` value when saving pipeline valves. This happens when you set a valve to "None" (null) and then click save. This PR Fix this issue.
This commit is contained in:
parent
ce945a9334
commit
8cea0cf746
1 changed files with 1 additions and 1 deletions
|
|
@ -47,7 +47,7 @@
|
||||||
if (pipeline && (pipeline?.valves ?? false)) {
|
if (pipeline && (pipeline?.valves ?? false)) {
|
||||||
for (const property in valves_spec.properties) {
|
for (const property in valves_spec.properties) {
|
||||||
if (valves_spec.properties[property]?.type === 'array') {
|
if (valves_spec.properties[property]?.type === 'array') {
|
||||||
valves[property] = valves[property].split(',').map((v) => v.trim());
|
valves[property] = (valves[property] ?? '').split(',').map((v) => v.trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue