From 1cfecac7aa4059797ed06355410357d742dc59d5 Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Tue, 23 Jul 2019 11:43:23 +0200 Subject: [PATCH] fix sql builder if where is empty --- process/Sql_lib/process.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/process/Sql_lib/process.js b/process/Sql_lib/process.js index 97349505c7..96fad8157d 100644 --- a/process/Sql_lib/process.js +++ b/process/Sql_lib/process.js @@ -851,8 +851,8 @@ SqlBuilder.prototype._getClause = function (pElement, pPrefix, pAutoJoin) pElement = _getElement(pElement); } } - - if (pPrefix) + + if (pPrefix && pElement) pElement = pPrefix + " " + pElement; return [pElement.toString(), preparedValues]; -- GitLab