1
0
Fork 0
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:
yfprojects 2022-05-30 14:46:09 +00:00 committed by GitHub
parent 422ca7f418
commit 492a3128f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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