Fix detecting whether sources are configured (#1613)

Fixes #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)
This commit is contained in:
Divyansh Singh 2023-03-02 22:25:31 +05:30 committed by GitHub
parent 618a1fe278
commit a00ed62e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ class BorgCreateJob(BorgJob):
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