aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-17 09:03:18 +0200
committerChocobozzz <me@florianbigard.com>2022-06-17 09:03:28 +0200
commit68d6e57870dd5ea87a03d13adcfcc72786d8348a (patch)
tree29723ba7a5e99874e8aa507f6ef7c4894574378f
parentcdd838168d617f70fc04fe7f23846810e7e07082 (diff)
downloadPeerTube-68d6e57870dd5ea87a03d13adcfcc72786d8348a.tar.gz
PeerTube-68d6e57870dd5ea87a03d13adcfcc72786d8348a.tar.zst
PeerTube-68d6e57870dd5ea87a03d13adcfcc72786d8348a.zip
Fix transaction when processing local viewer
-rw-r--r--server/lib/activitypub/local-video-viewer.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/activitypub/local-video-viewer.ts b/server/lib/activitypub/local-video-viewer.ts
index 738083adc..bdd746791 100644
--- a/server/lib/activitypub/local-video-viewer.ts
+++ b/server/lib/activitypub/local-video-viewer.ts
@@ -23,7 +23,7 @@ async function createOrUpdateLocalVideoViewer (watchAction: WatchActionObject, v
23 : null, 23 : null,
24 24
25 videoId: video.id 25 videoId: video.id
26 }) 26 }, { transaction: t })
27 27
28 await LocalVideoViewerWatchSectionModel.bulkCreateSections({ 28 await LocalVideoViewerWatchSectionModel.bulkCreateSections({
29 localVideoViewerId: localVideoViewer.id, 29 localVideoViewerId: localVideoViewer.id,
@@ -31,7 +31,9 @@ async function createOrUpdateLocalVideoViewer (watchAction: WatchActionObject, v
31 watchSections: watchAction.watchSections.map(s => ({ 31 watchSections: watchAction.watchSections.map(s => ({
32 start: s.startTimestamp, 32 start: s.startTimestamp,
33 end: s.endTimestamp 33 end: s.endTimestamp
34 })) 34 })),
35
36 transaction: t
35 }) 37 })
36} 38}
37 39