[PR #29618] fix: preserve empty list for FILE_LIST type in base_app_generator #32490

Closed
opened 2026-02-21 20:51:30 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/29618

State: closed
Merged: Yes


Summary

  • Preserve empty lists [] for optional FILE_LIST variables instead of converting to None
  • Empty strings are still treated as unset (returns None)
  • Prevents downstream components like document_extractor from failing with "unsupported variable type"

Fixes #29598

Test plan

  • Updated test test_validate_inputs_optional_file_list_with_empty_list to expect [] instead of None
  • Added new test test_validate_inputs_optional_file_list_with_empty_string to verify empty string returns None
  • All 8 tests in test_base_app_generator.py pass
**Original Pull Request:** https://github.com/langgenius/dify/pull/29618 **State:** closed **Merged:** Yes --- ## Summary - Preserve empty lists `[]` for optional FILE_LIST variables instead of converting to `None` - Empty strings are still treated as unset (returns `None`) - Prevents downstream components like `document_extractor` from failing with "unsupported variable type" Fixes #29598 ## Test plan - [x] Updated test `test_validate_inputs_optional_file_list_with_empty_list` to expect `[]` instead of `None` - [x] Added new test `test_validate_inputs_optional_file_list_with_empty_string` to verify empty string returns `None` - [x] All 8 tests in `test_base_app_generator.py` pass
yindo added the pull-request label 2026-02-21 20:51:30 -05:00
yindo closed this issue 2026-02-21 20:51:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32490