Properly save folder stats based on profile (#1118)

And bug in removing jobs when removing profile
This commit is contained in:
Manu 2021-11-19 17:26:59 +04:00 committed by GitHub
parent 0dafa9de85
commit 324104bdf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -229,5 +229,6 @@ class VortaScheduler(QtCore.QObject):
logger.info('Finished background task for profile %s', profile.name)
def remove_job(self, profile_id):
self.timers[profile_id]['qtt'].stop()
del self.timers[profile_id]
if profile_id in self.timers:
self.timers[profile_id]['qtt'].stop()
del self.timers[profile_id]

View File

@ -75,7 +75,7 @@ class SourceTab(SourceBase, SourceUI, BackupProfileMixin):
files_count = int(files_count)
for item in items:
db_item = SourceFileModel.get(dir=path)
db_item = SourceFileModel.get(dir=path, profile=self.profile())
if QFileInfo(path).isDir():
self.sourceFilesWidget.item(item.row(), SourceColumn.Type).setText(self.tr("Folder"))
self.sourceFilesWidget.item(item.row(), SourceColumn.FilesCount).setText(format(files_count))