From 044e9ad90d9181317f22c0430f1d5e38b60866ba Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 3 Oct 2022 16:06:00 +0100 Subject: [PATCH] Don't cast datetime is checking (not)empty --- packages/frontend-core/src/utils/lucene.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/frontend-core/src/utils/lucene.js b/packages/frontend-core/src/utils/lucene.js index 1221e20664..774ddbd834 100644 --- a/packages/frontend-core/src/utils/lucene.js +++ b/packages/frontend-core/src/utils/lucene.js @@ -121,7 +121,12 @@ export const buildLuceneQuery = filter => { query.allOr = true return } - if (type === "datetime" && !isHbs) { + if ( + type === "datetime" && + !isHbs && + operator !== "empty" && + operator !== "notEmpty" + ) { // Ensure date value is a valid date and parse into correct format if (!value) { return