diff --git a/ddpui/utils/singletaskprogress.py b/ddpui/utils/singletaskprogress.py index 50b8b58c0..5db5a1015 100644 --- a/ddpui/utils/singletaskprogress.py +++ b/ddpui/utils/singletaskprogress.py @@ -19,7 +19,10 @@ def __init__(self, task_key: str, expire_in_seconds: int) -> None: def get(self) -> list: """get the list of progress""" - return json.loads(self.redis.get(self.task_key_)) + result = self.redis.get(self.task_key_) + if result is None: + return [] + return json.loads(result) def set(self, progress: list) -> None: """set the list of progress"""