aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ee/kicad/make_bom.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ee/kicad/make_bom.py b/src/ee/kicad/make_bom.py
index 3fa102f..e061f15 100644
--- a/src/ee/kicad/make_bom.py
+++ b/src/ee/kicad/make_bom.py
@@ -71,9 +71,11 @@ def dpn_strategy_factory(dpn_mappings: Mapping[str, str]) -> StrategyCallable:
def dpn_strategy(component: Component, part: bomFile.Part) -> bomFile.Part:
for field_name, distributor in dpn_mappings:
s = component.get_field(field_name)
- if s is not None:
- pn = bomFile.PartNumber(value=s, distributor=distributor)
- part.part_numbersProp.add_part_number(pn)
+ if s is None:
+ continue
+
+ pn = bomFile.PartNumber(value=s.value, distributor=distributor)
+ part.part_numbersProp.add_part_number(pn)
return part