Germano Cavalcante commited on
Commit
566fa33
1 Parent(s): 6923641

Fix: Error showing related issues

Browse files
Files changed (1) hide show
  1. routers/tool_find_related.py +4 -3
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
- number_cached = int(re.search(r'#(\d+):', duplicates[0]).group(1))
365
- if number_cached == number:
366
- return '\n'.join(duplicates[1:])
 
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