fix: jobless video assets no longer 500 the library click
Legacy/edge-case video_assets rows without a processing job threw 'has no processing job' from getVideoStatus — the library detail click 500ed. VideoStatus.processingJob is now nullable end to end (api type, DTO, web consumers null-guarded); a jobless asset renders as queued.
This commit is contained in:
parent
215952fe5e
commit
31c97a0b0a
13 changed files with 95 additions and 25 deletions
|
|
@ -119,7 +119,7 @@ export default function VideoPage(): React.ReactElement {
|
|||
const applyStatus = useCallback((status: VideoStatusDto): void => {
|
||||
const entry: VideoLibraryEntryDto = {
|
||||
videoAsset: status.videoAsset,
|
||||
processingState: status.processingJob.state,
|
||||
processingState: status.processingJob?.state ?? "queued",
|
||||
publications: [],
|
||||
};
|
||||
setItems((current) => [entry, ...(current ?? []).filter((e) => e.videoAsset.id !== entry.videoAsset.id)]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue