Description: After adding a new Internal Reference field to the batches of a material library record definition when attempting to create a batch by sending the link value the batch creation fails with the error "The request parameters are in bad format. ERROR: insert or update on table [...]violates foreign key constraint".
Cause: This can happen if a link/url value is being used instead of the eid of the entity to reference.
Solution: Use the supported Internal Reference type field payload format in the request body:
- Individual value reference field:
{
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"value": {
"eid":"experiment:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
} Multiple values reference field:
{
"id": "6a308665de15624ab114535d",
"value": [
{
"eid": ""experiment:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
},
{
"eid": "experiment:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
]
}
Comments
0 comments
Article is closed for comments.