diff --git a/kibot/bom/bom.py b/kibot/bom/bom.py index 4f3f76c5..d62bb329 100644 --- a/kibot/bom/bom.py +++ b/kibot/bom/bom.py @@ -363,10 +363,15 @@ def group_components(cfg, components): def do_bom(file_name, ext, comps, cfg): # Apply all the filters - for c in comps: - c.in_bom = cfg.exclude_filter.filter(c) - c.fitted = cfg.dnf_filter.filter(c) - c.fixed = cfg.dnc_filter.filter(c) + if cfg.exclude_filter: + for c in comps: + c.in_bom = cfg.exclude_filter.filter(c) + if cfg.dnf_filter: + for c in comps: + c.fitted = cfg.dnf_filter.filter(c) + if cfg.dnc_filter: + for c in comps: + c.fixed = cfg.dnc_filter.filter(c) # Apply the variant cfg.variant.filter(comps) # Group components according to group_fields