Weakky/ra-data-opencrud

ReferenceInput allowEmpty attribute not working correctly

Opened this issue · 1 comments

To replicate, create a reference input with the allowEmpty attribute.

  1. Set the reference input
  2. Save
  3. Edit and select empty for the reference input
  4. Save

The result is a request with the following data object:

{title: "Title", parent: {connect: {id: ""}}}

and the following error:

Warning: Missing translation for key: "GraphQL error: No Node for the model PostCategory with value for id found."

Expected result is no error and a request with data object something like this:

{title: "Title", parent: {disconnect: true}}

Similar problem with embedded objects of prisma-mondogb {parent:{foo: 1, baz: 2}} is not working when using arraylist with nested items.

Weakky, maybe you can give a direction how to fix this ?..