diff options
Diffstat (limited to 'server/models/account/account.ts')
-rw-r--r-- | server/models/account/account.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 747b51afb..ee22d8528 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts | |||
@@ -24,7 +24,6 @@ import { getSort, throwIfNotValid } from '../utils' | |||
24 | import { VideoChannelModel } from '../video/video-channel' | 24 | import { VideoChannelModel } from '../video/video-channel' |
25 | import { VideoCommentModel } from '../video/video-comment' | 25 | import { VideoCommentModel } from '../video/video-comment' |
26 | import { UserModel } from './user' | 26 | import { UserModel } from './user' |
27 | import * as Bluebird from '../../helpers/custom-validators/accounts' | ||
28 | import { CONFIG } from '../../initializers' | 27 | import { CONFIG } from '../../initializers' |
29 | 28 | ||
30 | @DefaultScope({ | 29 | @DefaultScope({ |
@@ -136,7 +135,7 @@ export class AccountModel extends Model<AccountModel> { | |||
136 | } | 135 | } |
137 | 136 | ||
138 | static load (id: number, transaction?: Sequelize.Transaction) { | 137 | static load (id: number, transaction?: Sequelize.Transaction) { |
139 | return AccountModel.findById(id, { transaction }) | 138 | return AccountModel.findByPk(id, { transaction }) |
140 | } | 139 | } |
141 | 140 | ||
142 | static loadByUUID (uuid: string) { | 141 | static loadByUUID (uuid: string) { |