X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Faccount%2Faccount.ts;h=27c75d8861203c3be8c6e8e27b9d134e3dbb334c;hb=e724fa93c71d76d709e819a05e5e2904a3c4205b;hp=6bbfc6f4e8d50f223c8eddb45f2f22ad50de9178;hpb=f37dc0dd14d9ce0b59c454c2c1b935fcbe9727e9;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 6bbfc6f4e..27c75d886 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts @@ -19,7 +19,6 @@ import { isAccountDescriptionValid } from '../../helpers/custom-validators/accou import { sendDeleteActor } from '../../lib/activitypub/send' import { ActorModel } from '../activitypub/actor' import { ApplicationModel } from '../application/application' -import { AvatarModel } from '../avatar/avatar' import { ServerModel } from '../server/server' import { getSort, throwIfNotValid } from '../utils' import { VideoChannelModel } from '../video/video-channel' @@ -134,8 +133,8 @@ export class AccountModel extends Model { return undefined } - static load (id: number) { - return AccountModel.findById(id) + static load (id: number, transaction?: Sequelize.Transaction) { + return AccountModel.findById(id, { transaction }) } static loadByUUID (uuid: string) {