Skip to content

Commit d9341f2

Browse files
committed
Bug 1873109 - ensure uniqueness of bugs in suggestions for failure line
1 parent f955cfd commit d9341f2

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

treeherder/model/error_summary.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,20 @@ def bug_suggestions_line(
152152
continue
153153
if term not in term_cache:
154154
term_cache[term] = Bugscache.search(term)
155-
bugs['open_recent'].extend(term_cache[term]['open_recent'])
156-
bugs['all_others'].extend(term_cache[term]['all_others'])
155+
bugs['open_recent'].extend(
156+
[
157+
bug_to_check
158+
for bug_to_check in term_cache[term]['open_recent']
159+
if bug_to_check['id'] not in [bug['id'] for bug in bugs['open_recent']]
160+
]
161+
)
162+
bugs['all_others'].extend(
163+
[
164+
bug_to_check
165+
for bug_to_check in term_cache[term]['all_others']
166+
if bug_to_check['id'] not in [bug['id'] for bug in bugs['all_others']]
167+
]
168+
)
157169

158170
if not bugs or not (bugs['open_recent'] or bugs['all_others']):
159171
# no suggestions, try to use

0 commit comments

Comments
 (0)