Fixed bug when last symbol of comment was always returned if the 'traceback' text was not found in last_traceback_filter method
and the bot thought that two test fails with different tracebacks are similar and marked them with 100% similarity
Fixed-Bug: PRODX-37491
Change-Id: Ic23cf04c19f3b591e3af984d4dc25b51093f871f
diff --git a/testrail_bot/control/celery_tasks/filters.py b/testrail_bot/control/celery_tasks/filters.py
index e19b5d5..4407eed 100644
--- a/testrail_bot/control/celery_tasks/filters.py
+++ b/testrail_bot/control/celery_tasks/filters.py
@@ -13,4 +13,6 @@
def last_traceback_filter(data: str) -> str:
+ if data.rfind("Traceback") < 0:
+ return data
return data[data.rfind("Traceback"):]