From eae0365b5c5468e51e9795b0e894815ebda86b4a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 15 Jun 2021 09:17:19 +0200 Subject: Fix missing transactions --- server/models/video/video-channel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/models/video/video-channel.ts') 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 { -- cgit v1.2.3