diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-15 09:17:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-15 10:40:06 +0200 |
commit | eae0365b5c5468e51e9795b0e894815ebda86b4a (patch) | |
tree | 5da54b28c94d43d1715a0c69e35eb1cf3a1a959d /server/models/video/video-channel.ts | |
parent | 51f636ad0f928bb94069c9143e38df0518f6e4a7 (diff) | |
download | PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.tar.gz PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.tar.zst PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.zip |
Fix missing transactions
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r-- | server/models/video/video-channel.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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"` | |||
522 | }) | 522 | }) |
523 | } | 523 | } |
524 | 524 | ||
525 | static loadAndPopulateAccount (id: number): Promise<MChannelBannerAccountDefault> { | 525 | static loadAndPopulateAccount (id: number, transaction?: Transaction): Promise<MChannelBannerAccountDefault> { |
526 | return VideoChannelModel.unscoped() | 526 | return VideoChannelModel.unscoped() |
527 | .scope([ ScopeNames.WITH_ACTOR_BANNER, ScopeNames.WITH_ACCOUNT ]) | 527 | .scope([ ScopeNames.WITH_ACTOR_BANNER, ScopeNames.WITH_ACCOUNT ]) |
528 | .findByPk(id) | 528 | .findByPk(id, { transaction }) |
529 | } | 529 | } |
530 | 530 | ||
531 | static loadByUrlAndPopulateAccount (url: string): Promise<MChannelBannerAccountDefault> { | 531 | static loadByUrlAndPopulateAccount (url: string): Promise<MChannelBannerAccountDefault> { |