Hey I have this weird bug:
payload.create
is returning this error:
{
"error": {
"index": 0,
"code": 11000,
"keyPattern": {
"username": 1
},
"keyValue": {
"username": null
}
}
}
This should happen when there is a conflict between two unique fields. But in my case I have removed the field "username" which was unique. I don't understand where it is getting the "username" from?
The problem was that
Indexes
inside MongoDB don't get updated when a collection is removed/updated.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.