1
0
Fork 0

Fix video update transaction

This commit is contained in:
Chocobozzz 2021-11-10 15:52:22 +01:00
parent 7fc1012ffd
commit 597f771f3f
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 3 additions and 3 deletions

View file

@ -104,7 +104,7 @@ export async function updateVideo (req: express.Request, res: express.Response)
// Force updatedAt attribute change
if (!video.changed()) {
await video.setAsRefreshed()
await video.setAsRefreshed(t)
}
const videoInstanceUpdated = await video.save(sequelizeOptions) as MVideoFullLight

View file

@ -1754,8 +1754,8 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
return this.hasPrivacyForFederation() === false && isPrivacyForFederation(newPrivacy) === true
}
setAsRefreshed () {
return setAsUpdated('video', this.id)
setAsRefreshed (transaction?: Transaction) {
return setAsUpdated('video', this.id, transaction)
}
requiresAuth () {