Skip to content

Commit

Permalink
Fix Tribler#8026 KeyError when sorting by the RATIO column
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed May 22, 2024
1 parent 410b72e commit 093f9ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tribler/gui/widgets/downloadwidgetitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')) > (
Expand Down

0 comments on commit 093f9ce

Please sign in to comment.