Sparnatural
Sparnatural copied to clipboard
Modifying example query with aggregation fails
If I load a preset query with a count and then modify this query, I will get an error in the console and the UI for the aggregation empties:
SparqlGenerator.ts:55 Uncaught TypeError: Cannot read properties of undefined (reading 'selectedVariable')
at po.generateQuery (SparqlGenerator.ts:55:39)
at fo.generateQuery (GenerateQuery.ts:51:32)
at HTMLDivElement.<anonymous> (ActionStore.ts:52:34)
at RemoveEndClass.ts:45:22
at HTMLLIElement.<anonymous> (GroupWrapperEventStore.ts:36:9)
at ClassTypeId.ts:118:20
at HTMLSpanElement.<anonymous> (UnselectBtn.ts:10:7)
at HTMLSpanElement.dispatch (jquery.js:5430:27)
at e.9755.S.event.add.m.handle (jquery.js:5234:28)
example query:
{
"distinct": true,
"variables": [
{
"expression": {
"type": "aggregate",
"aggregation": "count",
"distinct": false,
"expression": {
"termType": "Variable",
"value": "institution_1"
}
},
"variable": {
"termType": "Variable",
"value": "institution_1_count"
}
},
{
"termType": "Variable",
"value": "region_4"
}
],
"order": null,
"branches": [
{
"line": {
"s": "institution_1",
"p": "http://www.graceful17.org/shacl/sparnatural-config/primary_place",
"o": "place_2",
"sType": "http://www.graceful17.org/shacl/sparnatural-config/institution",
"oType": "http://www.graceful17.org/shacl/sparnatural-config/place",
"values": []
},
"children": [
{
"line": {
"s": "place_2",
"p": "http://www.graceful17.org/shacl/sparnatural-config/falls_within",
"o": "region_4",
"sType": "http://www.graceful17.org/shacl/sparnatural-config/place",
"oType": "http://www.graceful17.org/shacl/sparnatural-config/region",
"values": []
},
"children": []
}
]
}
]
}