From 5433b6ae0c3e11eb152b58cf24cc4f6fdb0a0a05 Mon Sep 17 00:00:00 2001 From: Leonardo Viva Date: Mon, 15 Apr 2024 12:10:16 -0300 Subject: [PATCH] fix: permissions condition to fn --- src/imports/data/filterUtils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/imports/data/filterUtils.js b/src/imports/data/filterUtils.js index f98b6a4..02bf697 100644 --- a/src/imports/data/filterUtils.js +++ b/src/imports/data/filterUtils.js @@ -10,6 +10,7 @@ import map from 'lodash/map'; import reduce from 'lodash/reduce'; import size from 'lodash/size'; import startsWith from 'lodash/startsWith'; +import tail from 'lodash/tail'; import uniqBy from 'lodash/uniqBy'; import { MetaObject } from '@imports/model/MetaObject'; @@ -576,7 +577,7 @@ export function filterConditionToFn(condition, metaObject, req) { return value; } - return get(value, termParts[1]); + return get(value, tail(termParts)); }); };