diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-26 14:08:35 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-26 14:08:35 +0200 |
commit | 2e7cf5ae0cf8fbc9526742b67a0079d42211644c (patch) | |
tree | 5a7ad1a7c7033f3b6f894be8cfecb2af8f337da4 /server/models/video/video-file.ts | |
parent | 60e74f80d87cdb366a70a48e4316bb0dff4cab16 (diff) | |
download | PeerTube-2e7cf5ae0cf8fbc9526742b67a0079d42211644c.tar.gz PeerTube-2e7cf5ae0cf8fbc9526742b67a0079d42211644c.tar.zst PeerTube-2e7cf5ae0cf8fbc9526742b67a0079d42211644c.zip |
Fix video files duplicated when fps is null
Null values are not considered equal in a UNIQUE index
Diffstat (limited to 'server/models/video/video-file.ts')
-rw-r--r-- | server/models/video/video-file.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts index 0887a3738..f040803b9 100644 --- a/server/models/video/video-file.ts +++ b/server/models/video/video-file.ts | |||
@@ -66,8 +66,8 @@ export class VideoFileModel extends Model<VideoFileModel> { | |||
66 | @Column | 66 | @Column |
67 | infoHash: string | 67 | infoHash: string |
68 | 68 | ||
69 | @AllowNull(true) | 69 | @AllowNull(false) |
70 | @Default(null) | 70 | @Default(-1) |
71 | @Is('VideoFileFPS', value => throwIfNotValid(value, isVideoFPSResolutionValid, 'fps')) | 71 | @Is('VideoFileFPS', value => throwIfNotValid(value, isVideoFPSResolutionValid, 'fps')) |
72 | @Column | 72 | @Column |
73 | fps: number | 73 | fps: number |