mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 04:01:27 +00:00
fix(services): check for possible None progress when moving folders
This commit is contained in:
parent
fb41c092f1
commit
f059c83b57
|
@ -60,6 +60,9 @@ def move_folders_to_volume(
|
|||
job: Job,
|
||||
) -> None:
|
||||
current_progress = job.progress
|
||||
if current_progress is None:
|
||||
current_progress = 0
|
||||
|
||||
folder_percentage = 50 // len(folders)
|
||||
for folder in folders:
|
||||
folder_name = get_foldername(folder)
|
||||
|
|
|
@ -311,8 +311,8 @@ class Service(ABC):
|
|||
Only changes userdata
|
||||
"""
|
||||
|
||||
with WriteUserData() as user_data:
|
||||
service_id = cls.get_id()
|
||||
with WriteUserData() as user_data:
|
||||
if "modules" not in user_data:
|
||||
user_data["modules"] = {}
|
||||
if service_id not in user_data["modules"]:
|
||||
|
|
Loading…
Reference in a new issue