diff --git a/CHANGELOG.md b/CHANGELOG.md index a2516186..d23329d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `--list`: problems with layers and fields specific for the project. (INTI-CMNB/kibot_variants_arduprog#4) - Makefile: %VALUE not expanded in the directory targets. +- KiCost variants: empty DNF fields shouldn't be excluded. (#101) ## [0.11.0] - 2021-04-25 diff --git a/kibot/fil_base.py b/kibot/fil_base.py index 30be3ce7..75f078af 100644 --- a/kibot/fil_base.py +++ b/kibot/fil_base.py @@ -284,8 +284,9 @@ class BaseFilter(RegFilter): o_tree = {'name': name} o_tree['type'] = 'generic' o_tree['comment'] = 'Internal filter for KiCost `dnp` field' - # dnp = 0 is included, other dnp values are excluded - o_tree['exclude_any'] = [{'column': 'dnp', 'regex': r'^\s*0(\.0*)?\s*$', 'invert': True, 'skip_if_no_field': True}] + # dnp = 0 and empty are included, other dnp values are excluded + o_tree['exclude_any'] = [{'column': 'dnp', 'regex': r'^((\s*0(\.0*)?\s*)|(\s*))$', 'invert': True, + 'skip_if_no_field': True}] return o_tree @staticmethod