Skip to content

Commit

Permalink
Merge pull request #7323 from kozlovsky/fix/7321_tooltip_key_error
Browse files Browse the repository at this point in the history
Fixes #7321 KeyError while surfing through a channel's content
  • Loading branch information
kozlovsky committed Mar 16, 2023
2 parents 677b6e4 + 6e62b83 commit a0f991d
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 a0f991d

Please sign in to comment.