From dedc7abb7beccb0b3a4a4fa4e8ccfef8ceecd5a6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 4 Sep 2019 15:03:50 +0200 Subject: Fix auto blacklist view --- server/models/video/video-blacklist.ts | 1 - 1 file changed, 1 deletion(-) (limited to 'server/models/video/video-blacklist.ts') diff --git a/server/models/video/video-blacklist.ts b/server/models/video/video-blacklist.ts index 22d949da0..18a1b8b4b 100644 --- a/server/models/video/video-blacklist.ts +++ b/server/models/video/video-blacklist.ts @@ -64,7 +64,6 @@ export class VideoBlacklistModel extends Model { const countQuery = buildBaseQuery() const findQuery = buildBaseQuery() - findQuery.subQuery = false findQuery.include = [ { model: VideoModel, -- cgit v1.2.3 From 951532924c1b3fd547cbf45f0c9cf9734203d6b4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 4 Sep 2019 16:23:37 +0200 Subject: Fix blacklist sort --- server/models/video/video-blacklist.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/models/video/video-blacklist.ts') diff --git a/server/models/video/video-blacklist.ts b/server/models/video/video-blacklist.ts index 18a1b8b4b..cdb725e7a 100644 --- a/server/models/video/video-blacklist.ts +++ b/server/models/video/video-blacklist.ts @@ -1,11 +1,11 @@ import { AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' -import { getSortOnModel, SortType, throwIfNotValid } from '../utils' +import { getBlacklistSort, getSort, SortType, throwIfNotValid } from '../utils' import { ScopeNames as VideoModelScopeNames, VideoModel } from './video' import { ScopeNames as VideoChannelScopeNames, SummaryOptions, VideoChannelModel } from './video-channel' import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../helpers/custom-validators/video-blacklist' import { VideoBlacklist, VideoBlacklistType } from '../../../shared/models/videos' import { CONSTRAINTS_FIELDS } from '../../initializers/constants' -import { FindOptions } from 'sequelize' +import { FindOptions, literal } from 'sequelize' import { ThumbnailModel } from './thumbnail' @Table({ @@ -57,7 +57,7 @@ export class VideoBlacklistModel extends Model { return { offset: start, limit: count, - order: getSortOnModel(sort.sortModel, sort.sortValue) + order: getBlacklistSort(sort.sortModel, sort.sortValue) } } -- cgit v1.2.3