From 0ae3f0fdfc864dcf5c90c6b56cf975997974742c Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Wed, 31 Jul 2019 12:13:15 +0800 Subject: [PATCH] Passed mongoTransformer through to NQL refs #10922 --- core/server/models/plugins/filter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/server/models/plugins/filter.js b/core/server/models/plugins/filter.js index c3d4b51c06..942227938e 100644 --- a/core/server/models/plugins/filter.js +++ b/core/server/models/plugins/filter.js @@ -61,6 +61,7 @@ const filter = function filter(Bookshelf) { let extra = this.extraFilters(options); let overrides = this.enforcedFilters(options); let defaults = this.defaultFilters(options); + let transformer = options.mongoTransformer; debug('custom', custom); debug('extra', extra); @@ -81,7 +82,8 @@ const filter = function filter(Bookshelf) { relations: RELATIONS, expansions: EXPANSIONS, overrides: overrides, - defaults: defaults + defaults: defaults, + transformer: transformer }).querySQL(qb); }); } catch (err) {