1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-22 07:43:09 +00:00

Catch case of none-existant profile from logs

This commit is contained in:
Manu 2024-09-14 14:42:03 +01:00 committed by Manu
parent 00fa34a842
commit 547b39ff0b

View file

@ -224,7 +224,9 @@ def react_to_log(self, mgs, context):
""" """
msgid = context.get('msgid') msgid = context.get('msgid')
if msgid == 'LockTimeout': if msgid == 'LockTimeout':
profile = BackupProfileModel.get(name=context['profile_name']) profile = BackupProfileModel.get_or_none(name=context['profile_name'])
if profile is None: # Repo may not yet exist in DB.
return
repo_url = context.get('repo_url') repo_url = context.get('repo_url')
msg = QMessageBox() msg = QMessageBox()
msg.setWindowTitle(self.tr("Repository In Use")) msg.setWindowTitle(self.tr("Repository In Use"))