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 should be able to access a collection in ForestAdmin
Actual behavior
I get the message "Oops, something went wrong" when I try to access a collection
Failure Logs
error [forest] 馃尦馃尦馃尦 Unexpected error: Cannot set property 'stats' of null
Cannot set property 'stats' of null
at /var/app/node_modules/forest-express/dist/serializers/resource.js:60:29
at arrayMap (/var/app/node_modules/forest-express/node_modules/lodash/lodash.js:614:23)
at Function.map (/var/app/node_modules/forest-express/node_modules/lodash/lodash.js:8561:14)
at getAttributesFor (/var/app/node_modules/forest-express/dist/serializers/resource.js:46:9)
at /var/app/node_modules/forest-express/dist/serializers/resource.js:64:13
at arrayMap (/var/app/node_modules/forest-express/node_modules/lodash/lodash.js:614:23)
at Function.map (/var/app/node_modules/forest-express/node_modules/lodash/lodash.js:8561:14)
at getAttributesFor (/var/app/node_modules/forest-express/dist/serializers/resource.js:46:9)
at ResourceSerializer.perform (/var/app/node_modules/forest-express/dist/serializers/resource.js:149:5)
at /var/app/node_modules/forest-express/dist/routes/resources.js:24:140
at tryCatcher (/var/app/node_modules/forest-express-mongoose/node_modules/bluebird/js/main/util.js:24:31)
at Promise._settlePromiseFromHandler (/var/app/node_modules/forest-express-mongoose/node_modules/bluebird/js/main/promise.js:454:31)
at Promise._settlePromiseAt (/var/app/node_modules/forest-express-mongoose/node_modules/bluebird/js/main/promise.js:530:18)
at Promise._settlePromises (/var/app/node_modules/forest-express-mongoose/node_modules/bluebird/js/main/promise.js:646:14)
at Async._drainQueue (/var/app/node_modules/forest-express-mongoose/node_modules/bluebird/js/main/async.js:177:16)
at Async._drainQueues (/var/app/node_modules/forest-express-mongoose/node_modules/bluebird/js/main/async.js:187:10)
at Immediate.Async.drainQueues (/var/app/node_modules/forest-express-mongoose/node_modules/bluebird/js/main/async.js:15:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
Context
The issue seems to come from the depth of my model
Expected behavior
I should be able to access a collection in ForestAdmin
Actual behavior
I get the message "Oops, something went wrong" when I try to access a collection
Failure Logs
Context
The issue seems to come from the depth of my model
I could fix this by adding a condition
if (!_.isNil(dest) && _.isPlainObject(field.type))
here https://github.com/ForestAdmin/forest-express/blob/8bd2bb1e91c29c7955dd82a951b868044519cab6/src/serializers/resource.js#L59.But it's a parent project, so I don't know the consequences this fix can have on forest-express-sequelize.
The text was updated successfully, but these errors were encountered: