KiCost variants: empty DNF fields shouldn't be excluded.

Fixes #101
This commit is contained in:
Salvador E. Tropea 2021-11-15 15:06:32 -03:00
parent 998754753d
commit 087e36b2c7
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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