mirror of https://github.com/Chocobozzz/PeerTube
Fix loading actor involved in video
parent
985e79f61e
commit
05d84f659d
|
@ -59,7 +59,7 @@ export async function getActorsInvolvedInVideo (video: MVideoId, t: Transaction)
|
|||
? alreadyLoadedActor
|
||||
: await ActorModel.loadAccountActorFollowerUrlByVideoId(video.id, t)
|
||||
|
||||
actors.push(videoActor)
|
||||
if (videoActor) actors.push(videoActor)
|
||||
|
||||
return actors
|
||||
}
|
||||
|
|
|
@ -359,6 +359,11 @@ export class ActorModel extends SequelizeModel<ActorModel> {
|
|||
}
|
||||
|
||||
return ActorModel.sequelize.query<MActorId & MActorFollowersUrl>(query, options)
|
||||
.then(res => {
|
||||
if (res && res.length !== 0) return res[0]
|
||||
|
||||
return undefined
|
||||
})
|
||||
}
|
||||
|
||||
static listByFollowersUrls (followersUrls: string[], transaction?: Transaction): Promise<MActorFull[]> {
|
||||
|
|
Loading…
Reference in New Issue