Open FlorianWilhelm opened 2 years ago
Thanks for the detailed report! I believe this is the same issue as #9 where read-only properties cause the update method to fail. I've been contemplating a rewrite of how Notional handles this, but time has been limited lately 😒
As a workaround, you would need to create a dictionary of properties to update from the pages object. Then you can simply pass that to the update method:
notion_orm.pages.update(p, **props)
It's not a great solution, but might get you moving.
Thanks for the fast reply. I'll try that.
Regarding a proper solution. Wouldn't it help to have some kind of update attribute on all properties that gets set to true when the object is changed? During an update, only those properties with updated=True are transferred.
indeed. but it can be easily achieved by building a function based on what we have now. what i want is to update the whole database just using one request to notion server.
what i want is to update the whole database just using one request to notion server.
Keep in mind that Notional is just a wrapper around the official Notion API. In order to support this, the official API would need to change.
To determine to current version, run
python -m notional
Notional Version: current main brunch, i.e.
notional.__version__
shows0.4.1-73c5bc5
, it seems like this should have been increased to0.4.2
in the last release?Description
Updating a page doesn't work if the page contains a formula property.
Steps To Reproduce
Expected Behavior
Since we are not changing anything, calling
notion_orm.pages.update(p)
should just work. Instead:Just removing the property
MyFormula
from the database fixes this problem. Interesting is that also the propertyLevel
seems to be affected when a Formula is present although it's of typeselect
.Additional Context