From c24822a8fdbc0647aa983fe7d784864ec3b9b854 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 12 Apr 2021 13:44:58 +0200 Subject: Don't save other attributes when set as refreshed --- server/models/video/video.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/models/video') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index e9afb2c18..422bf6deb 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -2027,9 +2027,11 @@ export class VideoModel extends Model { } setAsRefreshed () { - this.changed('updatedAt', true) + const options = { + where: { id: this.id } + } - return this.save() + return VideoModel.update({ updatedAt: new Date() }, options) } requiresAuth () { -- cgit v1.2.3