1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-21 23:33:13 +00:00

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

View file

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