From 093f9cef6ba4a4384d373fa10a5530861865599c Mon Sep 17 00:00:00 2001 From: Alexander Kozlovsky Date: Mon, 13 May 2024 13:47:06 +0200 Subject: [PATCH] Fix #8026 KeyError when sorting by the RATIO column --- src/tribler/gui/widgets/downloadwidgetitem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tribler/gui/widgets/downloadwidgetitem.py b/src/tribler/gui/widgets/downloadwidgetitem.py index baec88bbe4f..3da1ea5bc5c 100644 --- a/src/tribler/gui/widgets/downloadwidgetitem.py +++ b/src/tribler/gui/widgets/downloadwidgetitem.py @@ -129,7 +129,7 @@ def __lt__(self, other): elif column == 7: return float(self.download_info["speed_up"]) > float(other.download_info["speed_up"]) elif column == 8: - return float(self.download_info["ratio"]) > float(other.download_info["ratio"]) + return float(self.download_info["all_time_ratio"]) > float(other.download_info["all_time_ratio"]) elif column == 11: # Put finished downloads with an ETA of 0 after all other downloads return (float(self.download_info["eta"]) or float('inf')) > (