diff --git a/aiida_workgraph/engine/workgraph.py b/aiida_workgraph/engine/workgraph.py index 41221cbd..3774b92f 100644 --- a/aiida_workgraph/engine/workgraph.py +++ b/aiida_workgraph/engine/workgraph.py @@ -924,9 +924,9 @@ def check_for_conditions(self) -> bool: @calcfunction def __getitem__(sequence, count): value = sequence[count.value] - # only convert if not already orm type - # because sequence might be builtin collection with orm types - # so a conversion is not needed and would raise an error + # only convert value f not already orm type because sequence + # might be builtin collection with orm types so a conversion is + # not needed and would raise an error if isinstance(value, orm.Data): return value else: