diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-12 13:44:58 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-04-12 13:44:58 +0200 |
commit | c24822a8fdbc0647aa983fe7d784864ec3b9b854 (patch) | |
tree | 31634264504b4df282377ab6dc25a4f60a65828c /server/models/video/video.ts | |
parent | b044cb188d1aac57fbb589e1627e400439cda10f (diff) | |
download | PeerTube-c24822a8fdbc0647aa983fe7d784864ec3b9b854.tar.gz PeerTube-c24822a8fdbc0647aa983fe7d784864ec3b9b854.tar.zst PeerTube-c24822a8fdbc0647aa983fe7d784864ec3b9b854.zip |
Don't save other attributes when set as refreshed
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 6 |
1 files changed, 4 insertions, 2 deletions
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 { | |||
2027 | } | 2027 | } |
2028 | 2028 | ||
2029 | setAsRefreshed () { | 2029 | setAsRefreshed () { |
2030 | this.changed('updatedAt', true) | 2030 | const options = { |
2031 | where: { id: this.id } | ||
2032 | } | ||
2031 | 2033 | ||
2032 | return this.save() | 2034 | return VideoModel.update({ updatedAt: new Date() }, options) |
2033 | } | 2035 | } |
2034 | 2036 | ||
2035 | requiresAuth () { | 2037 | requiresAuth () { |