Optimize SQL requests of watch page API endpoints
[oweals/peertube.git] / server / lib / job-queue / handlers / video-import.ts
index ebcb2090cd42a725ab5e10c4da489533186aa778..9e14e57e6f7b5bd4032537b1f8438130f32da195 100644 (file)
@@ -183,7 +183,7 @@ async function processFile (downloader: () => Promise<string>, videoImport: Vide
       const videoUpdated = await video.save({ transaction: t })
 
       // Now we can federate the video (reload from database, we need more attributes)
-      const videoForFederation = await VideoModel.loadByUUIDAndPopulateAccountAndServerAndTags(video.uuid, t)
+      const videoForFederation = await VideoModel.loadAndPopulateAccountAndServerAndTags(video.uuid, t)
       await federateVideoIfNeeded(videoForFederation, true, t)
 
       // Update video import object