]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/utils.ts
Fix comments SQL pagination
[github/Chocobozzz/PeerTube.git] / server / models / utils.ts
index 69ad123ac9eb87aea08fc36caa71f1081d08f874..93723816f29bc499a49349c7ec9a13beadc1bd27 100644 (file)
@@ -258,12 +258,12 @@ function buildSQLAttributes <M extends Model> (options: {
   model: ModelStatic<M>
   tableName: string
 
-  excludeAttributes?: (keyof AttributesOnly<M>)[]
+  excludeAttributes?: Exclude<keyof AttributesOnly<M>, symbol>[]
   aliasPrefix?: string
 }) {
   const { model, tableName, aliasPrefix, excludeAttributes } = options
 
-  const attributes = Object.keys(model.getAttributes())
+  const attributes = Object.keys(model.getAttributes()) as Exclude<keyof AttributesOnly<M>, symbol>[]
 
   return attributes
     .filter(a => {