Skip to content

Commit 43fd73f

Browse files
committedMar 22, 2024
Group components: no case sensitive
See #561
1 parent 8333165 commit 43fd73f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎kicost/edas/tools.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def group_parts(components, fields_merge, c_prjs):
147147
# Don't use the manufacturer's part number when calculating the hash!
148148
# Also, don't use any fields with SEPRTR in the label because that indicates
149149
# a field used by a specific tool (including KiCost).
150-
hash_fields = (fields[k] for k in fields if k not in FIELDS_NOT_HASH and SEPRTR not in k)
150+
hash_fields = (fields[k].lower() for k in fields if k not in FIELDS_NOT_HASH and SEPRTR not in k)
151151
h = hash(tuple(sorted(hash_fields)))
152152

153153
# Now add the hashed component to the group with the matching hash
@@ -291,7 +291,7 @@ def group_parts(components, fields_merge, c_prjs):
291291
if val is None: # Field with no value...
292292
continue # so ignore it.
293293
if grp_fields.get(key): # This field has been seen before.
294-
if grp_fields[key] != val: # Flag if new field value not the same as old.
294+
if grp_fields[key].lower() != val.lower(): # Flag if new field value not the same as old.
295295
raise KiCostError('Field value mismatch: ref={} field={} value=\'{}\', global=\'{}\' at group={}'
296296
.format(ref, key, val, grp_fields[key], grp.refs), ERR_FIELDS)
297297
else: # First time this field has been seen in the group, so store it.

0 commit comments

Comments
 (0)