do not add autogenerated designators to BOM

This commit is contained in:
Daniel Rojas 2021-10-21 20:25:42 +02:00 committed by Laurier Loiselle
parent d9f0c3f07c
commit a59149b8a8
No known key found for this signature in database
GPG Key ID: 345920CC72089A3F

View File

@ -9,6 +9,7 @@ from graphviz import Graph
import wireviz.wv_colors
from wireviz.DataClasses import (
AUTOGENERATED_PREFIX,
AdditionalComponent,
Arrow,
ArrowWeight,
@ -98,10 +99,10 @@ class Harness:
bom_entry["designators"] = set()
# update fields
bom_entry["qty"] += qty
if designator:
if designator and not designator.startswith(AUTOGENERATED_PREFIX):
if isinstance(designator, str):
bom_entry["designators"].add(designator)
else:
else: # list
bom_entry["designators"].update(designator)
bom_entry["category"] = category