diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-23 09:50:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-24 16:26:21 +0200 |
commit | 3acc50844047a37698f0618fa235c138e386a053 (patch) | |
tree | e33243bf7fadbcf2df616fc41814245094fd881a /server/models/account/account-blocklist.ts | |
parent | 1735c825726edaa0af5035cb6cbb0cc0db502c6d (diff) | |
download | PeerTube-3acc50844047a37698f0618fa235c138e386a053.tar.gz PeerTube-3acc50844047a37698f0618fa235c138e386a053.tar.zst PeerTube-3acc50844047a37698f0618fa235c138e386a053.zip |
Upgrade sequelize
Diffstat (limited to 'server/models/account/account-blocklist.ts')
-rw-r--r-- | server/models/account/account-blocklist.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/models/account/account-blocklist.ts b/server/models/account/account-blocklist.ts index efd6ed59e..d5746ad76 100644 --- a/server/models/account/account-blocklist.ts +++ b/server/models/account/account-blocklist.ts | |||
@@ -8,22 +8,22 @@ enum ScopeNames { | |||
8 | WITH_ACCOUNTS = 'WITH_ACCOUNTS' | 8 | WITH_ACCOUNTS = 'WITH_ACCOUNTS' |
9 | } | 9 | } |
10 | 10 | ||
11 | @Scopes({ | 11 | @Scopes(() => ({ |
12 | [ScopeNames.WITH_ACCOUNTS]: { | 12 | [ScopeNames.WITH_ACCOUNTS]: { |
13 | include: [ | 13 | include: [ |
14 | { | 14 | { |
15 | model: () => AccountModel, | 15 | model: AccountModel, |
16 | required: true, | 16 | required: true, |
17 | as: 'ByAccount' | 17 | as: 'ByAccount' |
18 | }, | 18 | }, |
19 | { | 19 | { |
20 | model: () => AccountModel, | 20 | model: AccountModel, |
21 | required: true, | 21 | required: true, |
22 | as: 'BlockedAccount' | 22 | as: 'BlockedAccount' |
23 | } | 23 | } |
24 | ] | 24 | ] |
25 | } | 25 | } |
26 | }) | 26 | })) |
27 | 27 | ||
28 | @Table({ | 28 | @Table({ |
29 | tableName: 'accountBlocklist', | 29 | tableName: 'accountBlocklist', |
@@ -83,7 +83,7 @@ export class AccountBlocklistModel extends Model<AccountBlocklistModel> { | |||
83 | attributes: [ 'accountId', 'id' ], | 83 | attributes: [ 'accountId', 'id' ], |
84 | where: { | 84 | where: { |
85 | accountId: { | 85 | accountId: { |
86 | [Op.any]: accountIds | 86 | [Op.in]: accountIds // FIXME: sequelize ANY seems broken |
87 | }, | 87 | }, |
88 | targetAccountId | 88 | targetAccountId |
89 | }, | 89 | }, |