mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-17 16:09:14 +00:00
fix(services): check for possible None progress when moving folders
This commit is contained in:
parent
17a1e34c0d
commit
c22802f693
|
@ -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
|
||||
"""
|
||||
|
||||
service_id = cls.get_id()
|
||||
with WriteUserData() as user_data:
|
||||
service_id = cls.get_id()
|
||||
if "modules" not in user_data:
|
||||
user_data["modules"] = {}
|
||||
if service_id not in user_data["modules"]:
|
||||
|
|
Loading…
Reference in a new issue