]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/tag.ts
Ensure we don't run transcoding after import file
[github/Chocobozzz/PeerTube.git] / server / models / video / tag.ts
index d04205703b7a12b1121a38e571b09cfebc9f6504..61dfb224d37c21d5223aa4495e9ec5504f03d8c2 100644 (file)
@@ -1,6 +1,7 @@
 import { col, fn, QueryTypes, Transaction } from 'sequelize'
 import { AllowNull, BelongsToMany, Column, CreatedAt, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
 import { MTag } from '@server/types/models'
+import { AttributesOnly } from '@shared/core-utils'
 import { VideoPrivacy, VideoState } from '../../../shared/models/videos'
 import { isVideoTagValid } from '../../helpers/custom-validators/videos'
 import { throwIfNotValid } from '../utils'
@@ -17,11 +18,11 @@ import { VideoTagModel } from './video-tag'
     },
     {
       name: 'tag_lower_name',
-      fields: [ fn('lower', col('name')) ] as any // FIXME: typings
+      fields: [ fn('lower', col('name')) ]
     }
   ]
 })
-export class TagModel extends Model {
+export class TagModel extends Model<Partial<AttributesOnly<TagModel>>> {
 
   @AllowNull(false)
   @Is('VideoTag', value => throwIfNotValid(value, isVideoTagValid, 'tag'))