oarepo / oarepo-model-builder-drafts

0 stars 0 forks source link

Potential bug in referencing parent marshmallow schema #19

Open mesemus opened 10 months ago

mesemus commented 10 months ago

In invenio-rdm-records, parent is always referenced via NestedAttribute. This prevents de/serialization when the record is fetched, for example, from opensearch.

In our code parent is referenced with plain Nested and is deserialized even from opensearch result. This might bring:

This also seems to be the case of files and others.

mesemus commented 10 months ago

image

mesemus commented 10 months ago

See also https://github.com/inveniosoftware/invenio-rdm-records/blob/bbdd2251ad275274a6282f47c075c51893c2b035/invenio_rdm_records/services/schemas/record.py#L61