You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a Repartition chart that for one of my models. The "Group By" is set to a field that, in my model is a ref to another model. The UI sends this in the body of the request
I get an error response back from the API "Cannot read property 'reference' of undefined" with this stack
If I curl the request the UI makes, but change the body so that the field group_by_field equals organisation rather than organisation:name, it works! So not sure if the UI should change or the API.
Failure Logs
TODO: Please include any relevant log snippets, if necessary.
TypeError: Cannot read property 'reference' of undefined
at getReference (/node_modules/forest-express-mongoose/services/pie-stat-getter.js:17:18)
at PieStatGetter.perform (/node_modules/forest-express-mongoose/services/pie-stat-getter.js:35:32)
at get (/node_modules/forest-express/dist/routes/stats.js:20:79)
at Layer.handle [as handle_request] (/node_modules/forest-express/node_modules/express/lib/router/layer.js:95:5)
...
TODO: Please provide any relevant information about your setup.
Package Version:2.9.0
Express Version: 4.15.2
Mongoose Version: 5.1.2
MongoDB Version: 3.6
The text was updated successfully, but these errors were encountered:
Expected behaviour
I created a Repartition chart that for one of my models. The "Group By" is set to a field that, in my model is a ref to another model. The UI sends this in the body of the request
## Actual behaviour
I get an error response back from the API "Cannot read property 'reference' of undefined" with this stack
If I curl the request the UI makes, but change the body so that the field
group_by_field
equalsorganisation
rather thanorganisation:name
, it works! So not sure if the UI should change or the API.Failure Logs
TODO: Please include any relevant log snippets, if necessary.
TODO: Please provide any relevant information about your setup.
The text was updated successfully, but these errors were encountered: