mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix deleting a video with comments
This commit is contained in:
parent
d6bd50ba1d
commit
29c6b82944
@ -188,6 +188,27 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
|
||||
}) as AccountModel
|
||||
}
|
||||
|
||||
if (!instance.Video) {
|
||||
instance.Video = await instance.$get('Video', {
|
||||
include: [
|
||||
{
|
||||
model: VideoChannelModel,
|
||||
include: [
|
||||
{
|
||||
model: AccountModel,
|
||||
include: [
|
||||
{
|
||||
model: ActorModel
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
transaction: options.transaction
|
||||
}) as VideoModel
|
||||
}
|
||||
|
||||
if (instance.isOwned()) {
|
||||
await sendDeleteVideoComment(instance, options.transaction)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user