diff --git a/doorstop/core/item.py b/doorstop/core/item.py index 04aae6971..2e52fe2d3 100644 --- a/doorstop/core/item.py +++ b/doorstop/core/item.py @@ -358,7 +358,11 @@ def _yaml_data(self, textattributekeys=None): continue stripped_value = [] for el in value: - ref_dict = {"path": el["path"].strip(), "type": "file"} # type: ignore + if isinstance(el, dict) and "type" in el: + type_stripped = el["type"].strip() + else: + type_stripped = "file" + ref_dict = {"path": el["path"].strip(), "type": type_stripped} # type: ignore if "keyword" in el: ref_dict["keyword"] = el["keyword"] # type: ignore