diff --git a/lightkube/codecs.py b/lightkube/codecs.py index 96e68ad..6fd792e 100644 --- a/lightkube/codecs.py +++ b/lightkube/codecs.py @@ -92,7 +92,7 @@ def _flatten(objects: Iterator) -> List[AnyResource]: for obj in objects: if obj is None: continue - if isinstance(obj, Mapping) and obj.get("kind").endswith("List"): + if isinstance(obj, Mapping) and obj.get("kind", "").endswith("List"): resources += _flatten(obj.get("items") or []) else: res = from_dict(obj)