mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-11 07:24:15 +00:00
Simplify display of possible conflicting parts
- Round to single digit - Only show 5 closest matches
This commit is contained in:
@ -245,7 +245,7 @@ def match_part_names(match, threshold=80, reverse=True, compare_length=False):
|
||||
if ratio >= threshold:
|
||||
matches.append({
|
||||
'part': part,
|
||||
'ratio': ratio
|
||||
'ratio': round(ratio, 1)
|
||||
})
|
||||
|
||||
matches = sorted(matches, key=lambda item: item['ratio'], reverse=reverse)
|
||||
|
Reference in New Issue
Block a user