mirror of
https://github.com/bellingcat/whisperbox-transcribe.git
synced 2026-06-13 05:58:35 +03:00
fix: default to None for optional pydantic fields (#45)
closes #44 Co-authored-by: msramalho <19508417+msramalho@users.noreply.github.com>
This commit is contained in:
@@ -41,10 +41,11 @@ class JobConfig(BaseModel):
|
||||
"""(JSON) Configuration for a job."""
|
||||
|
||||
language: str | None = Field(
|
||||
default=None,
|
||||
description=(
|
||||
"Spoken language in the media file. "
|
||||
"While optional, this can improve output."
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -52,11 +53,13 @@ class JobMeta(BaseModel):
|
||||
"""(JSON) Metadata relating to a job's execution."""
|
||||
|
||||
error: str | None = Field(
|
||||
description="Will contain a descriptive error message if processing failed."
|
||||
default=None,
|
||||
description="Will contain a descriptive error message if processing failed.",
|
||||
)
|
||||
|
||||
task_id: uuid.UUID | None = Field(
|
||||
description="Internal celery id of this job submission."
|
||||
default=None,
|
||||
description="Internal celery id of this job submission.",
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user