X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-channel.ts;h=33749ea70fef997ce20c346b9f61fbf0e599ceff;hb=eae0365b5c5468e51e9795b0e894815ebda86b4a;hp=8c4357009dc91a430cde32e3221887c76b71b255;hpb=96d52038788dda2f479362ce8e980f895369eec7;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 8c4357009..33749ea70 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -522,10 +522,10 @@ ON "Account->Actor"."serverId" = "Account->Actor->Server"."id"` }) } - static loadAndPopulateAccount (id: number): Promise { + static loadAndPopulateAccount (id: number, transaction?: Transaction): Promise { return VideoChannelModel.unscoped() .scope([ ScopeNames.WITH_ACTOR_BANNER, ScopeNames.WITH_ACCOUNT ]) - .findByPk(id) + .findByPk(id, { transaction }) } static loadByUrlAndPopulateAccount (url: string): Promise {