fix: preserve empty list for FILE_LIST type in base_app_generator (#29618)

Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
This commit is contained in:
lif
2025-12-22 21:32:07 +08:00
committed by GitHub
parent c3b713d88a
commit 542eb04ad8
2 changed files with 26 additions and 3 deletions

View File

@ -105,8 +105,9 @@ class BaseAppGenerator:
variable_entity.type in {VariableEntityType.FILE, VariableEntityType.FILE_LIST}
and not variable_entity.required
):
# Treat empty string (frontend default) or empty list as unset
if not value and isinstance(value, (str, list)):
# Treat empty string (frontend default) as unset
# For FILE_LIST, allow empty list [] to pass through
if isinstance(value, str) and not value:
return None
if variable_entity.type in {