mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-15 09:31:21 +00:00
fix: Sub-agents settings show blank and switched off when a limit is 0 (#33612)
Saving the Sub-agents admin tab could turn sub-agents off and clear their system prompt when one of the limits was still 0. Older releases accepted 0 there, also from the SUBAGENTS_MAX_* environment variables, but the tab now fails to load such a value and shows everything blank and switched off, so saving writes that blank state back. A limit of 0 now shows as empty, meaning no limit, which matches what sub-agents already do with a 0 while they run. Fixes #33609
This commit is contained in:
parent
d22c4449ca
commit
f3ef8b9491
1 changed files with 1 additions and 1 deletions
|
|
@ -814,7 +814,7 @@ class SubagentsConfigForm(BaseModel):
|
|||
)
|
||||
@classmethod
|
||||
def normalize_limit(cls, value):
|
||||
return None if value == '' else value
|
||||
return None if value in ('', 0) else value
|
||||
|
||||
@field_validator('SUBAGENTS_MAX_CONCURRENT', 'SUBAGENTS_MAX_ASYNC', mode='before')
|
||||
@classmethod
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue