We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02adb4a commit 21e12f9Copy full SHA for 21e12f9
examples/bom_add_kb_components_from_list.py
@@ -60,7 +60,10 @@ def find_kb_component(component_name):
60
hit_counts = dict()
61
for item in items:
62
for hit in item['hits']:
63
- if component_name.strip() in hit['fields']['name']:
+ aliases = hit.get('fields').get('aliases', None)
64
+ if aliases and component_name.strip() in aliases:
65
+ hit_counts[hit['_meta']['href']] = hit['fields']['release_count']
66
+ elif component_name.strip() in hit['fields']['name']:
67
hit_counts[hit['_meta']['href']] = hit['fields']['release_count']
68
return hit_counts
69
0 commit comments