Spaces:
Running
Running
Germano Cavalcante
commited on
Commit
•
566fa33
1
Parent(s):
6923641
Fix: Error showing related issues
Browse files
routers/tool_find_related.py
CHANGED
@@ -361,9 +361,10 @@ def find_relatedness(repo: str, number: int, limit: int = 20, state: State = Sta
|
|
361 |
if not duplicates:
|
362 |
return ''
|
363 |
|
364 |
-
|
365 |
-
|
366 |
-
|
|
|
367 |
|
368 |
return '\n'.join(duplicates)
|
369 |
|
|
|
361 |
if not duplicates:
|
362 |
return ''
|
363 |
|
364 |
+
if match := re.search(r'(~~)?#(\d+)(~~)?:', duplicates[0]):
|
365 |
+
number_cached = int(match.group(2))
|
366 |
+
if number_cached == number:
|
367 |
+
return '\n'.join(duplicates[1:])
|
368 |
|
369 |
return '\n'.join(duplicates)
|
370 |
|