GET /api/users/count
this work fine
GET /api/users/count?filters[karnet][data_zakonczenia][$gt]=2024-07-11
this throws error 500
This topic has been created from a Discord post (1261069795684520161) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord
2024-07-11 23:21:47 [2024-07-11 21:21:47.947] error: Undefined attribute level operator karnet
2024-07-11 23:21:47 Error: Undefined attribute level operator karnet
2024-07-11 23:21:47 at processAttributeWhere (/opt/node_modules/@strapi/database/lib/query/helpers/where.js:45:13)
2024-07-11 23:21:47 at processWhere (/opt/node_modules/@strapi/database/lib/query/helpers/where.js:107:45)
2024-07-11 23:21:47 at /opt/node_modules/@strapi/database/lib/query/helpers/where.js:67:31
2024-07-11 23:21:47 at Array.map (<anonymous>)
2024-07-11 23:21:47 at Object.processWhere (/opt/node_modules/@strapi/database/lib/query/helpers/where.js:67:18)
2024-07-11 23:21:47 at Object.processState (/opt/node_modules/@strapi/database/lib/query/query-builder.js:317:29)
2024-07-11 23:21:47 at Object.getKnexQuery (/opt/node_modules/@strapi/database/lib/query/query-builder.js:354:12)
2024-07-11 23:21:47 at Object.execute (/opt/node_modules/@strapi/database/lib/query/query-builder.js:475:25)
2024-07-11 23:21:47 at Object.count (/opt/node_modules/@strapi/database/lib/entity-manager/index.js:214:10)
2024-07-11 23:21:47 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
``` i get this in logs
Pretty sure Strapi count doesn’t support filters by default for /count. Might need to update in the controller. See this: How to Count in REST API in v4? - #2 by nextrapi