WIP - Loop node advanced parameters + complete_if_empty (#1675)

This commit is contained in:
Shuchang Zheng 2025-01-30 03:40:25 +08:00 committed by GitHub
parent 2166ab129b
commit 5e4b86c828
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View file

@ -765,6 +765,7 @@ class ForLoopBlock(Block):
loop_blocks: list[BlockTypeVar]
loop_over: PARAMETER_TYPE | None = None
loop_variable_reference: str | None = None
complete_if_empty: bool = False
def get_all_parameters(
self,
@ -849,7 +850,10 @@ class ForLoopBlock(Block):
raise NotImplementedError()
else:
raise NoIterableValueFound()
if self.complete_if_empty:
return []
else:
raise NoIterableValueFound()
if isinstance(parameter_value, list):
return parameter_value