mirror of
https://github.com/borgbase/vorta
synced 2024-12-22 07:43:09 +00:00
Fix unlink action when repo combobox is empty. By @real-yfprojects (#1342)
Fixes #1341
This commit is contained in:
parent
422ca7f418
commit
492a3128f8
1 changed files with 4 additions and 0 deletions
|
@ -251,6 +251,10 @@ def repo_unlink_action(self):
|
|||
selected_repo_id = self.repoSelector.currentData()
|
||||
selected_repo_index = self.repoSelector.currentIndex()
|
||||
|
||||
if selected_repo_index < 0:
|
||||
# QComboBox is empty
|
||||
return
|
||||
|
||||
repo = RepoModel.get(id=selected_repo_id)
|
||||
ArchiveModel.delete().where(ArchiveModel.repo_id == repo.id).execute()
|
||||
profile.repo = None
|
||||
|
|
Loading…
Reference in a new issue