I have a model with a localized modular content block.
Whenever I try to use the datocms-client API to update the model within a migration, I get the following error: āInvalid block record ID: 77625081. It does not belong to the Itemā, even if I just save the item IDs as they originally are received.
An example that replicates this problem (with some object names changed):
let item = (await client.items.all({ filter: { type: 'my_item_type' }, page: { limit: 1 } }))[0];
// => { "id": ..., "modular_field": { "en": [ ... ] } }
await client.items.update(item.id, { modular_field: { en: item.modular_field.en } })
// => {"field":"modular_field.en","code":"INVALID_FORMAT","message":"Invalid block record ID: 77625081. It does not belong to the Item"}
// => {"data":{"id":"77628769","type":"item","attributes":{"modular_field":{"en":["77625079","77625080","77625081","77625082","77623017","77623018","77623019","77623020","77618529","77618184"]}}}}