From addbeae82985c7da8bf86b81e0808c5d69679051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C5=ABlija=20Ov=C4=8Di=C5=86=C5=86ikova?= Date: Thu, 31 Oct 2024 14:24:26 +0200 Subject: [PATCH] Minor changes --- app/imports/client/custom/vq/js/generateSPARQL_jo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/imports/client/custom/vq/js/generateSPARQL_jo.js b/app/imports/client/custom/vq/js/generateSPARQL_jo.js index 78ddf94a..3e77cea4 100644 --- a/app/imports/client/custom/vq/js/generateSPARQL_jo.js +++ b/app/imports/client/custom/vq/js/generateSPARQL_jo.js @@ -4159,7 +4159,7 @@ function generateSPARQLWHEREInfo(sparqlTable, ws, fil, lin, referenceTable, SPAR var having = sparqlTable["subClasses"][subclass]["having"]; //ad triples from order by - temp = temp.concat(having["triples"]) + if(having !== null)temp = temp.concat(having["triples"]) selectResult["groupBy"] = selectResult["groupBy"].concat(refTable); selectResult["groupBy"] = selectResult["groupBy"].concat(orderBy["orderGroupBy"]); @@ -4213,7 +4213,7 @@ function generateSPARQLWHEREInfo(sparqlTable, ws, fil, lin, referenceTable, SPAR if(sparqlTable["subClasses"][subclass]["agregationInside"] == true || selectResult["aggregate"].length > 0) subQuery = subQuery + groupBy; - if(having.exp != "") subQuery = subQuery + "\n"+SPARQL_interval + "HAVING(" + having.exp + ")"; + if(having!== null && having.exp != "") subQuery = subQuery + "\n"+SPARQL_interval + "HAVING(" + having.exp + ")"; //ORDER BY if (orderBy["orders"] != "") subQuery = subQuery + "\n"+SPARQL_interval+"ORDER BY " + orderBy["orders"];