From 36a2996cda18371ce563fd9bc15551a6125cb2bf Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 25 Feb 2022 12:20:22 +0700 Subject: [PATCH] clean exit of progress builder when no videos in channel --- tubearchivist/home/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubearchivist/home/views.py b/tubearchivist/home/views.py index 2366f03..dd87ac0 100644 --- a/tubearchivist/home/views.py +++ b/tubearchivist/home/views.py @@ -172,7 +172,7 @@ class ArchivistResultsView(ArchivistViewConfig): def match_progress(self): """add video progress to result context""" results = RedisArchivist().list_items(f"{self.user_id}:progress:") - if not results: + if not results or not self.context["results"]: return progress = {i["youtube_id"]: i["position"] for i in results}