diff options
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video-comment.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index 868d04ff9..ab0f05d6e 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts | |||
@@ -188,6 +188,27 @@ export class VideoCommentModel extends Model<VideoCommentModel> { | |||
188 | }) as AccountModel | 188 | }) as AccountModel |
189 | } | 189 | } |
190 | 190 | ||
191 | if (!instance.Video) { | ||
192 | instance.Video = await instance.$get('Video', { | ||
193 | include: [ | ||
194 | { | ||
195 | model: VideoChannelModel, | ||
196 | include: [ | ||
197 | { | ||
198 | model: AccountModel, | ||
199 | include: [ | ||
200 | { | ||
201 | model: ActorModel | ||
202 | } | ||
203 | ] | ||
204 | } | ||
205 | ] | ||
206 | } | ||
207 | ], | ||
208 | transaction: options.transaction | ||
209 | }) as VideoModel | ||
210 | } | ||
211 | |||
191 | if (instance.isOwned()) { | 212 | if (instance.isOwned()) { |
192 | await sendDeleteVideoComment(instance, options.transaction) | 213 | await sendDeleteVideoComment(instance, options.transaction) |
193 | } | 214 | } |