We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35ca711 commit 4b9d6b0Copy full SHA for 4b9d6b0
flatten.py
@@ -7,7 +7,7 @@
7
8
def flatten_base(base: Base) -> Iterable[Base]:
9
"""Take a base and flatten it to an iterable of bases."""
10
- if hasattr(base, "elements"):
+ if hasattr(base, "elements") and base.elements is not None:
11
for element in base["elements"]:
12
yield from flatten_base(element)
13
yield base
0 commit comments