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

[BUG] - Add formula in $notUpdatableProps #308

Closed
laHeud opened this issue Nov 8, 2023 · 1 comment · Fixed by #320
Closed

[BUG] - Add formula in $notUpdatableProps #308

laHeud opened this issue Nov 8, 2023 · 1 comment · Fixed by #320
Labels
bug Something isn't working

Comments

@laHeud
Copy link

laHeud commented Nov 8, 2023

Hello,

I think that, in the same way as uniqueIDs, the formula property should not be updated. Therefore, it should be added to $notUpdatableProps. I have an error on my side. And since the formula is based on other fields, when we update the page, we do not want to update the formula.

body failed validation. Fix one: body.properties.Total estimation.title should be defined, instead was undefined. body.properties.Total estimation.rich_text should be defined, instead was undefined. body.properties.Total estimation.number should be defined, instead was undefined. body.properties.Total estimation.url should be defined, instead was undefined. body.properties.Total estimation.select should be defined, instead was undefined. body.properties.Total estimation.multi_select should be defined, instead was undefined. body.properties.Total estimation.people should be defined, instead was undefined. body.properties.Total estimation.email should be defined, instead was undefined. body.properties.Total estimation.phone_number should be defined, instead was undefined. body.properties.Total estimation.date should be defined, instead was undefined. body.properties.Total estimation.checkbox should be defined, instead was undefined. body.properties.Total estimation.relation should be defined, instead was undefined. body.properties.Total estimation.files should be defined, instead was undefined. body.properties.Total estimation.status should be defined, instead was undefined. body.properties.Related Tickets.type should be not present, instead was "relation". body.properties.Related Tickets.relation should be not present, instead was []. body.properties.Related Tickets.name should be defined, instead was undefined. body.properties.Related Tickets.start should be defined, instead was undefined.

@laHeud laHeud added the bug Something isn't working label Nov 8, 2023
@laHeud laHeud changed the title [BUG] [BUG] - Add formula in $notUpdatableProps Nov 8, 2023
tambait added a commit to tambait/notion-sdk-php that referenced this issue Dec 15, 2023
@tambait
Copy link
Contributor

tambait commented Dec 15, 2023

Hi,
I'm experiencing the same issue as @laHeud . When a Notion database contains a column with the Formula property, making a request to the API (for example, to update any other property) will result in the error below. This occurs regardless of whether the Formula property is present in the object sent to the API.

Unless we're overseeing something I've made PR to add Formula property to notUpdatableProps.

...
"Textlength": {
      "type": "number",
      "string": null,
      "number": 1183,
      "boolean": null,
      "date": null
}
...
PHP message: PHP Fatal error:  Uncaught Notion\Exceptions\ApiException: body failed validation. Fix one:
body.properties.Textlength.title should be defined, instead was `undefined`.
body.properties.Textlength.rich_text should be defined, instead was `undefined`.
body.properties.Textlength.number should be defined, instead was `undefined`.
body.properties.Textlength.url should be defined, instead was `undefined`.
body.properties.Textlength.select should be defined, instead was `undefined`.
body.properties.Textlength.multi_select should be defined, instead was `undefined`.
body.properties.Textlength.people should be defined, instead was `undefined`.
body.properties.Textlength.email should be defined, instead was `undefined`.
body.properties.Textlength.phone_number should be defined, instead was `undefined`.
body.properties.Textlength.date should be defined, instead was `undefined`.
body.properties.Textlength.checkbox should be defined, instead was `undefined`.
body.properties.Textength.relation should be defin" while reading response header from upstream...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants