diff --git a/pyflow/adder.py b/pyflow/adder.py index 80ac9c3..22f955c 100644 --- a/pyflow/adder.py +++ b/pyflow/adder.py @@ -55,7 +55,10 @@ def replace(self, other): self.add(other) def _create(self, other): - assert other is not None + + result = [] + if other is None: + return result if isinstance(other, dict): other = [it for it in other.items()] @@ -63,7 +66,6 @@ def _create(self, other): if not isinstance(other, list): other = [other] - result = [] for o in other: if isinstance(o, tuple): if len(o) == 2 and isinstance(o[1], dict):