Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildBlockRecord fails to create attributes property when no properties given #12

Open
jackhugh opened this issue Oct 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jackhugh
Copy link

eg.

const myModel = await client.itemTypes.find('my_model');

await client.items.update(item.id, {
  blocks: [
    buildBlockRecord({
      item_type: myModel,
    }),
  ],
});

This results in the following error when trying to update a field "#: failed schema #: \"attributes\" wasn't supplied."

@marcelofinamorvieira
Copy link

Hello @jackhugh I was able to reproduce the issue, and I agree with you that for empty blocks, or blocks with no required fields, you should be able to not specify the empty attributes object, I'll get back to you as soon as this is solved!

@marcelofinamorvieira marcelofinamorvieira added the enhancement New feature or request label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants