Fix video update transaction
This commit is contained in:
parent
7fc1012ffd
commit
597f771f3f
|
@ -104,7 +104,7 @@ export async function updateVideo (req: express.Request, res: express.Response)
|
||||||
|
|
||||||
// Force updatedAt attribute change
|
// Force updatedAt attribute change
|
||||||
if (!video.changed()) {
|
if (!video.changed()) {
|
||||||
await video.setAsRefreshed()
|
await video.setAsRefreshed(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
const videoInstanceUpdated = await video.save(sequelizeOptions) as MVideoFullLight
|
const videoInstanceUpdated = await video.save(sequelizeOptions) as MVideoFullLight
|
||||||
|
|
|
@ -1754,8 +1754,8 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
|
||||||
return this.hasPrivacyForFederation() === false && isPrivacyForFederation(newPrivacy) === true
|
return this.hasPrivacyForFederation() === false && isPrivacyForFederation(newPrivacy) === true
|
||||||
}
|
}
|
||||||
|
|
||||||
setAsRefreshed () {
|
setAsRefreshed (transaction?: Transaction) {
|
||||||
return setAsUpdated('video', this.id)
|
return setAsUpdated('video', this.id, transaction)
|
||||||
}
|
}
|
||||||
|
|
||||||
requiresAuth () {
|
requiresAuth () {
|
||||||
|
|
Loading…
Reference in New Issue