Skip to content

Commit

Permalink
minor bug fix for regenerate VOTR tasks using bulk_csv_upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikvirendrar committed Nov 22, 2024
1 parent 0bc1e8e commit 43bc297
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/voiceover/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 43bc297

Please sign in to comment.