diff --git a/pyiron_workflow/channels.py b/pyiron_workflow/channels.py index d60853cb..74d7c5a6 100644 --- a/pyiron_workflow/channels.py +++ b/pyiron_workflow/channels.py @@ -789,7 +789,7 @@ def __init__( callback: callable, ): super().__init__(label=label, node=node, callback=callback) - self.received_signals: set[OutputSignal] = set() + self.received_signals: set[str] = set() def __call__(self, other: OutputSignal) -> None: """ @@ -798,8 +798,15 @@ def __call__(self, other: OutputSignal) -> None: Resets the collection of received signals when firing. """ - self.received_signals.update([other]) - if len(set(self.connections).difference(self.received_signals)) == 0: + self.received_signals.update([other.scoped_label]) + if ( + len( + set(c.scoped_label for c in self.connections).difference( + self.received_signals + ) + ) + == 0 + ): self.reset() self.callback() diff --git a/tests/unit/test_channels.py b/tests/unit/test_channels.py index b501875b..341badc8 100644 --- a/tests/unit/test_channels.py +++ b/tests/unit/test_channels.py @@ -381,7 +381,7 @@ def test_aggregating_call(self): ): agg() - out2 = OutputSignal(label="out", node=DummyNode()) + out2 = OutputSignal(label="out2", node=DummyNode()) agg.connect(self.out, out2) self.assertEqual(