From: Chocobozzz Date: Mon, 23 Dec 2019 12:43:05 +0000 (+0100) Subject: Fix search SQL query where duplication X-Git-Tag: v2.1.0-rc.1~153 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=def2a70b7e5ee807d7b532df8c9d33d17d24ccbb;p=oweals%2Fpeertube.git Fix search SQL query where duplication --- diff --git a/server/models/video/video.ts b/server/models/video/video.ts index e58146ccf..990c66907 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -316,7 +316,7 @@ export type AvailableForListIDsOptions = { return query }, [ ScopeNames.AVAILABLE_FOR_LIST_IDS ]: (options: AvailableForListIDsOptions) => { - const whereAnd = options.baseWhere ? options.baseWhere : [] + const whereAnd = options.baseWhere ? [].concat(options.baseWhere) : [] const query: FindOptions = { raw: true,