diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/actor/actor.ts | 5 | ||||
-rw-r--r-- | server/models/video/video-channel.ts | 3 | ||||
-rw-r--r-- | server/models/video/video.ts | 1 |
3 files changed, 4 insertions, 5 deletions
diff --git a/server/models/actor/actor.ts b/server/models/actor/actor.ts index 0cd30f545..8df49951d 100644 --- a/server/models/actor/actor.ts +++ b/server/models/actor/actor.ts | |||
@@ -496,7 +496,7 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> { | |||
496 | }, { where, transaction }) | 496 | }, { where, transaction }) |
497 | } | 497 | } |
498 | 498 | ||
499 | static loadAccountActorByVideoId (videoId: number): Promise<MActor> { | 499 | static loadAccountActorByVideoId (videoId: number, transaction: Transaction): Promise<MActor> { |
500 | const query = { | 500 | const query = { |
501 | include: [ | 501 | include: [ |
502 | { | 502 | { |
@@ -520,7 +520,8 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> { | |||
520 | } | 520 | } |
521 | ] | 521 | ] |
522 | } | 522 | } |
523 | ] | 523 | ], |
524 | transaction | ||
524 | } | 525 | } |
525 | 526 | ||
526 | return ActorModel.unscoped().findOne(query) | 527 | return ActorModel.unscoped().findOne(query) |
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index f84b85290..183e7448c 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts | |||
@@ -291,8 +291,7 @@ export class VideoChannelModel extends Model<Partial<AttributesOnly<VideoChannel | |||
291 | @BelongsTo(() => AccountModel, { | 291 | @BelongsTo(() => AccountModel, { |
292 | foreignKey: { | 292 | foreignKey: { |
293 | allowNull: false | 293 | allowNull: false |
294 | }, | 294 | } |
295 | hooks: true | ||
296 | }) | 295 | }) |
297 | Account: AccountModel | 296 | Account: AccountModel |
298 | 297 | ||
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 7a9e96210..1e5648a36 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -572,7 +572,6 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> { | |||
572 | foreignKey: { | 572 | foreignKey: { |
573 | allowNull: true | 573 | allowNull: true |
574 | }, | 574 | }, |
575 | hooks: true, | ||
576 | onDelete: 'cascade' | 575 | onDelete: 'cascade' |
577 | }) | 576 | }) |
578 | VideoChannel: VideoChannelModel | 577 | VideoChannel: VideoChannelModel |