Skip to content

Commit

Permalink
Fix detecting whether sources are configured (borgbase#1613)
Browse files Browse the repository at this point in the history
Fixes borgbase#1463. This makes the code count the database rows for the current profile only. 
Previously one could run a backup without any sources when one had sources configured in a different profile.

* src/vorta/borg/create.py (BorgCreateJob.prepare)
  • Loading branch information
diivi authored and ratchek committed Mar 3, 2023
1 parent 29d7bf2 commit 58d71ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vorta/borg/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def prepare(cls, profile):
else:
ret['ok'] = False # Set back to False, so we can do our own checks here.

n_backup_folders = SourceFileModel.select().count()
n_backup_folders = SourceFileModel.select().where(SourceFileModel.profile == profile).count()

# cmd options like `--paths-from-command` require a command
# that is appended to the arguments
Expand Down

0 comments on commit 58d71ac

Please sign in to comment.