clean exit of progress builder when no videos in channel

This commit is contained in:
simon 2022-02-25 12:20:22 +07:00
parent b98ccd9dab
commit 36a2996cda
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -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}