From effb3470dd1be3a0dd1eaa83991cef45b5e08dab Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 7 May 2019 16:03:37 +0200 Subject: kicad-to-bom: Checking if the component has a reference before using it. --- src/ee/kicad/to_bom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ee/kicad/to_bom.py b/src/ee/kicad/to_bom.py index 354d9ba..6cce5a5 100644 --- a/src/ee/kicad/to_bom.py +++ b/src/ee/kicad/to_bom.py @@ -44,7 +44,7 @@ def to_bom(schematic: Union[Schematic, Schematics], require_ref=True) -> Iterabl if require_ref and not c.has_ref_num: continue - if c.ref_type in bad_ref_types: + if c.has_ref_num and c.ref_type in bad_ref_types: continue cs.append(c) -- cgit v1.2.3