From 0cf25c329574909ab2f61e1abae30d7bb79be292 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 16 Sep 2022 06:17:34 -0300 Subject: [PATCH] Allow empty references in the generic filter Related to #248 --- kibot/fil_generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kibot/fil_generic.py b/kibot/fil_generic.py index 1b17deca..053aa13b 100644 --- a/kibot/fil_generic.py +++ b/kibot/fil_generic.py @@ -171,7 +171,7 @@ class Generic(BaseFilter): # noqa: F821 if self.exclude_empty_val and (value == '' or value == '~'): return exclude # Exclude all ref == #* - if self.exclude_all_hash_ref and comp.ref[0] == '#': + if self.exclude_all_hash_ref and comp.ref and comp.ref[0] == '#': return exclude # KiCad 5 PCB classification if self.exclude_virtual and comp.virtual: