From 43bc297bd85e1d12323c099d265cf3bc73c1865d Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Fri, 22 Nov 2024 10:48:15 +0530 Subject: [PATCH] minor bug fix for regenerate VOTR tasks using bulk_csv_upload --- backend/voiceover/views.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/voiceover/views.py b/backend/voiceover/views.py index ab64a184..c7d78695 100644 --- a/backend/voiceover/views.py +++ b/backend/voiceover/views.py @@ -91,6 +91,12 @@ def get_voice_over_id(task): .filter(status="VOICEOVER_EDIT_INPROGRESS") .first() ) + if task.status == "FAILED": + voice_over_id = ( + voice_over.filter(video=task.video) + .filter(status="VOICEOVER_SELECT_SOURCE") + .first() + ) else: if task.status == "NEW": voice_over_id = ( @@ -2260,7 +2266,7 @@ def csv_bulk_regenerate(request): with io.StringIO(decrypted) as fp: reader = csv.reader(fp, delimiter=",", quotechar='"') for row in reader: - if row: + if row and row[0].strip(): task_ids.append(int(row[0])) if len(task_ids) > 30: