]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/actor/actor-follow.ts
Fix video job error when video has been deleted
[github/Chocobozzz/PeerTube.git] / server / models / actor / actor-follow.ts
index 566bb5f319b0b45a17d081d34aa7251360d73312..9615229dd7ea3a332262e3f2a31951e42d29ab7f 100644 (file)
@@ -1,4 +1,4 @@
-import { difference, values } from 'lodash'
+import { difference } from 'lodash'
 import { Attributes, FindOptions, Includeable, IncludeOptions, Op, QueryTypes, Transaction, WhereAttributeHash } from 'sequelize'
 import {
   AfterCreate,
@@ -69,7 +69,7 @@ import { InstanceListFollowingQueryBuilder, ListFollowingOptions } from './sql/i
 export class ActorFollowModel extends Model<Partial<AttributesOnly<ActorFollowModel>>> {
 
   @AllowNull(false)
-  @Column(DataType.ENUM(...values(FOLLOW_STATES)))
+  @Column(DataType.ENUM(...Object.values(FOLLOW_STATES)))
   state: FollowState
 
   @AllowNull(false)
@@ -276,7 +276,7 @@ export class ActorFollowModel extends Model<Partial<AttributesOnly<ActorFollowMo
       })
     }
 
-    const where: WhereAttributeHash<Attributes<ActorFollowModel>> = { actorId}
+    const where: WhereAttributeHash<Attributes<ActorFollowModel>> = { actorId }
     if (state) where.state = state
 
     const query: FindOptions<Attributes<ActorFollowModel>> = {