Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/170'
Browse files Browse the repository at this point in the history
* origin/pr/170:
  Fix error on reverting Qube Manager to an older version
  • Loading branch information
marmarek committed Apr 3, 2019
2 parents 0cdbda5 + d2ad60e commit f4d0417
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions qubesmanager/qube_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,16 @@ def load_manager_settings(self):
self.sort_order = QtCore.Qt.SortOrder(
self.manager_settings.value("view/sort_order",
defaultValue=self.sort_order))
self.table.sortItems(self.columns_indices[self.sort_by_column],
self.sort_order)

try:
self.table.sortItems(self.columns_indices[self.sort_by_column],
self.sort_order)
except KeyError:
# the manager was sorted on a column that does not exist in the
# current version; possible only with downgrades
self.table.sortItems(self.columns_indices["Name"],
self.sort_order)

if not self.manager_settings.value("view/menubar_visible",
defaultValue=True):
self.action_menubar.setChecked(False)
Expand Down

0 comments on commit f4d0417

Please sign in to comment.