Skip to content

Commit 91da83f

Browse files
Merge pull request #87 from ecmwf/feature/do_not_fail_when_empty_property
allow (ignore) None as a empty definition
2 parents 6b6ddcc + 5c9aba9 commit 91da83f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

pyflow/adder.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,17 @@ def replace(self, other):
5555
self.add(other)
5656

5757
def _create(self, other):
58-
assert other is not None
58+
59+
result = []
60+
if other is None:
61+
return result
5962

6063
if isinstance(other, dict):
6164
other = [it for it in other.items()]
6265

6366
if not isinstance(other, list):
6467
other = [other]
6568

66-
result = []
6769
for o in other:
6870
if isinstance(o, tuple):
6971
if len(o) == 2 and isinstance(o[1], dict):

0 commit comments

Comments
 (0)