SchrodingersGat / KiBoM

Configurable BoM generation tool for KiCad EDA (http://kicad.org/)
MIT License
350 stars 95 forks source link

Fixed changing field values via the complex_variant option #199

Closed set-soft closed 3 months ago

set-soft commented 4 months ago

This is just a "backport" of the INTI-CMNB/KiBoM#23 PR by @PatrickBaus

Replacing field values using the complex_variant = True option is not case sensitive.

If the field name to be replaced contains uppercase letters, the comparison will fail because of the following code

if field.get('field', 'name') == name:

The first part of the comparison may contain uppercase letters. The latter part is typically lower case, but for safety reasons, I apply lower() as well. This PR contains the fix and also squashes some trailing white spaces.