Recently, I started getting this error when I create docs from my website. I don't know exactly when started. When I create docs with a user-related, the doc it's created but I get this error. Any thoughts?
[18:56:12] ERROR (payload): CastError: Cast to ObjectId failed for value "{
0|admin | id: '6422b93a36145bda8bf6ad09',
0|admin | name: 'Jorge',
0|admin | LastNames: 'Escamilla',
0|admin | role: 'attendee',
0|admin | createdAt: '2023-03-28T09:54:02.620Z',
0|admin | updatedAt: '2023-03-28T18:55:59.271Z'
0|admin | }" (type Object) at path "_id" for model "users"
0|admin | at model.Query.exec (/home/cronos/labnl-admin/node_modules/mongoose/lib/query.js:4789:21)
0|admin | at model.Query.Query.then (/home/cronos/labnl-admin/node_modules/mongoose/lib/query.js:4888:15)
0|admin | at processTicksAndRejections (node:internal/process/task_queues:95:5)
Hey @akacronos are you still getting this error?
No @jesschow , thanks, it was an access problem. 🙂
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.