aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/account/account.ts')
-rw-r--r--server/models/account/account.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/server/models/account/account.ts b/server/models/account/account.ts
index 5bf29f45a..ec4e8d946 100644
--- a/server/models/account/account.ts
+++ b/server/models/account/account.ts
@@ -37,8 +37,8 @@ import { ActorImageModel } from '../actor/actor-image'
37import { ApplicationModel } from '../application/application' 37import { ApplicationModel } from '../application/application'
38import { ServerModel } from '../server/server' 38import { ServerModel } from '../server/server'
39import { ServerBlocklistModel } from '../server/server-blocklist' 39import { ServerBlocklistModel } from '../server/server-blocklist'
40import { UserModel } from '../user/user'
41import { buildSQLAttributes, getSort, throwIfNotValid } from '../shared' 40import { buildSQLAttributes, getSort, throwIfNotValid } from '../shared'
41import { UserModel } from '../user/user'
42import { VideoModel } from '../video/video' 42import { VideoModel } from '../video/video'
43import { VideoChannelModel } from '../video/video-channel' 43import { VideoChannelModel } from '../video/video-channel'
44import { VideoCommentModel } from '../video/video-comment' 44import { VideoCommentModel } from '../video/video-comment'
@@ -296,9 +296,7 @@ export class AccountModel extends Model<Partial<AttributesOnly<AccountModel>>> {
296 { 296 {
297 model: ActorModel, 297 model: ActorModel,
298 required: true, 298 required: true,
299 where: { 299 where: ActorModel.wherePreferredUsername(name)
300 preferredUsername: name
301 }
302 } 300 }
303 ] 301 ]
304 } 302 }
@@ -321,9 +319,7 @@ export class AccountModel extends Model<Partial<AttributesOnly<AccountModel>>> {
321 { 319 {
322 model: ActorModel, 320 model: ActorModel,
323 required: true, 321 required: true,
324 where: { 322 where: ActorModel.wherePreferredUsername(name),
325 preferredUsername: name
326 },
327 include: [ 323 include: [
328 { 324 {
329 model: ServerModel, 325 model: ServerModel,