Skip to content

Commit

Permalink
Fixes Tribler#7321 KeyError while surfing through a channel's content
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed Mar 16, 2023
1 parent a916400 commit 5a4a3e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tribler/gui/widgets/tablecontentmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def item_txt(self, index, role, is_editing: bool = False):
time_without_microseconds = str(td).partition('.')[0]
return f'Checked: {time_without_microseconds} ago'

if role == Qt.ToolTipRole and column_type == Column.NAME:
if role == Qt.ToolTipRole and column_type == Column.NAME and "infohash" in item:
return f'{item["infohash"][:8]}'

# The 'name' column is special in a sense that we want to draw the title and tags ourselves.
Expand Down

0 comments on commit 5a4a3e0

Please sign in to comment.