Get all records from req

Expected behavior

Hey, I’m trying to use the select all feature:
this is my code:

const vendorIds = await new RecordsGetter(getModels().vendor).getAll(req.query);

The getModels().vendor is a sequlize object,

Actual behavior

getting TypeError: Cannot read property ‘format’ of undefined
    at new BaseOperatorDateParser (/Users/israelorbach/forest-service/node_modules/forest-express/dist/services/base-operator-date-parser.js:35:92)

Failure Logs

TypeError: Cannot read property ‘format’ of undefined
    at new BaseOperatorDateParser (/Users/israelorbach/forest-service/node_modules/forest-express/dist/services/base-operator-date-parser.js:35:92)
    at new FiltersParser (/Users/israelorbach/forest-service/node_modules/forest-express-sequelize/dist/services/filters-parser.js:24:29)
    at new ResourcesGetter (/Users/israelorbach/forest-service/node_modules/forest-express-sequelize/dist/services/resources-getter.js:44:24)
    at RecordsGetter.getAll (/Users/israelorbach/forest-service/node_modules/forest-express/dist/services/exposed/records-getter.js:56:14)
    at router.post (/Users/israelorbach/forest-service/src/forest/forest-actions/vendor.js:46:67)
    at Layer.handle [as handle_request] (/Users/israelorbach/forest-service/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/israelorbach/forest-service/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/Users/israelorbach/forest-service/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/israelorbach/forest-service/node_modules/express/lib/router/layer.js:95:5)
    at /Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:335:12)
    at next (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:275:10)
    at Function.handle (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:174:3)
    at router (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:47:12)
    at Layer.handle [as handle_request] (/Users/israelorbach/forest-service/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:317:13)
    at /Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:335:12)
    at next (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:275:10)
    at Function.handle (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:174:3)
    at router (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:47:12)
    at Layer.handle [as handle_request] (/Users/israelorbach/forest-service/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:317:13)
    at /Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:335:12)
    at next (/Users/israelorbach/forest-service/node_modules/express/lib/router/index.js:275:10)

Context

“express”: “^4.17.1”,
“forest-express-sequelize”: “^6.3.15”,

Hello @Israel_Or, welcome in the community :wave::partying_face:.

Thanks for your very detailed feedback.

For what I can see in the code, there is a missing information in the query, which is the property timezone. This property is usually sent by the forestadmin frontend, and is used to properly format date values.

Can you tell me a bit more about the context? Are you responding to a request from the Forest Admin frontend?

Thanks

Actually it’s my fault, didn’t check the select all option, just clicked on the checkbox