From d7f83948a1af0ef3bed61f83e87e826902c96f7d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 3 Aug 2018 09:27:30 +0200 Subject: Correctly handle video import errors --- server/models/video/video-import.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/models/video') diff --git a/server/models/video/video-import.ts b/server/models/video/video-import.ts index 6b8a16b65..c2e55509c 100644 --- a/server/models/video/video-import.ts +++ b/server/models/video/video-import.ts @@ -26,7 +26,7 @@ import { TagModel } from './tag' include: [ { model: () => VideoModel, - required: true, + required: false, include: [ { model: () => VideoChannelModel, @@ -112,7 +112,7 @@ export class VideoImportModel extends Model { include: [ { model: VideoModel, - required: true, + required: false, include: [ { model: VideoChannelModel, @@ -157,11 +157,13 @@ export class VideoImportModel extends Model { : undefined return { + id: this.id, targetUrl: this.targetUrl, state: { id: this.state, label: VideoImportModel.getStateLabel(this.state) }, + error: this.error, updatedAt: this.updatedAt.toISOString(), createdAt: this.createdAt.toISOString(), video -- cgit v1.2.3