Skip to content

Commit

Permalink
Merge pull request #8027 from kozlovsky/fix/ratio_column_sorting_key_…
Browse files Browse the repository at this point in the history
…error

Fix #8026 KeyError when sorting by the RATIO column
  • Loading branch information
kozlovsky authored May 22, 2024
2 parents 410b72e + 093f9ce commit 828bb79
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 828bb79

Please sign in to comment.