From d98383d7d369b5d45f0e1ac4ab6aaebbf9b7ee1a Mon Sep 17 00:00:00 2001 From: Raivis Dejus Date: Sat, 5 Oct 2024 21:47:23 +0300 Subject: [PATCH] Fallback for queued_at having no value (#932) --- buzz/db/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buzz/db/helpers.py b/buzz/db/helpers.py index d09858659..35c357578 100644 --- a/buzz/db/helpers.py +++ b/buzz/db/helpers.py @@ -16,7 +16,7 @@ def copy_transcriptions_from_json_to_sqlite(conn: Connection): cursor.execute( """ INSERT INTO transcription (id, error_message, export_formats, file, output_folder, progress, language, model_type, source, status, task, time_ended, time_queued, time_started, url, whisper_model_size, hugging_face_model_id) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, COALESCE(?, ?), ?, ?, ?, ?) RETURNING id; """, ( @@ -37,7 +37,7 @@ def copy_transcriptions_from_json_to_sqlite(conn: Connection): task.status.value, task.transcription_options.task.value, task.completed_at, - task.queued_at, + task.queued_at, datetime.now().isoformat(), task.started_at, task.url, task.transcription_options.model.whisper_model_size.value