aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/account')
-rw-r--r--server/models/account/account-video-rate.ts24
1 files changed, 5 insertions, 19 deletions
diff --git a/server/models/account/account-video-rate.ts b/server/models/account/account-video-rate.ts
index d5c214ecb..4bd8114cf 100644
--- a/server/models/account/account-video-rate.ts
+++ b/server/models/account/account-video-rate.ts
@@ -6,7 +6,7 @@ import { CONSTRAINTS_FIELDS, VIDEO_RATE_TYPES } from '../../initializers/constan
6import { VideoModel } from '../video/video' 6import { VideoModel } from '../video/video'
7import { AccountModel } from './account' 7import { AccountModel } from './account'
8import { ActorModel } from '../activitypub/actor' 8import { ActorModel } from '../activitypub/actor'
9import { getSort, throwIfNotValid } from '../utils' 9import { buildLocalAccountIdsIn, getSort, throwIfNotValid } from '../utils'
10import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 10import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
11import { AccountVideoRate } from '../../../shared' 11import { AccountVideoRate } from '../../../shared'
12import { ScopeNames as VideoChannelScopeNames, SummaryOptions, VideoChannelModel } from '../video/video-channel' 12import { ScopeNames as VideoChannelScopeNames, SummaryOptions, VideoChannelModel } from '../video/video-channel'
@@ -219,25 +219,11 @@ export class AccountVideoRateModel extends Model<AccountVideoRateModel> {
219 [Op.lt]: beforeUpdatedAt 219 [Op.lt]: beforeUpdatedAt
220 }, 220 },
221 videoId, 221 videoId,
222 type 222 type,
223 }, 223 accountId: {
224 include: [ 224 [Op.notIn]: buildLocalAccountIdsIn()
225 {
226 model: AccountModel.unscoped(),
227 required: true,
228 include: [
229 {
230 model: ActorModel.unscoped(),
231 required: true,
232 where: {
233 serverId: {
234 [Op.ne]: null
235 }
236 }
237 }
238 ]
239 } 225 }
240 ], 226 },
241 transaction: t 227 transaction: t
242 } 228 }
243 229