Skip to content

Commit

Permalink
Fallback for queued_at having no value (#932)
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus authored Oct 5, 2024
1 parent c6d19b0 commit d98383d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buzz/db/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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;
""",
(
Expand All @@ -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
Expand Down

0 comments on commit d98383d

Please sign in to comment.