jamalex / notion-py

Unofficial Python API client for Notion.so
MIT License
4.3k stars 475 forks source link

collection.add_row() fails on new databases #367

Open ghost opened 2 years ago

ghost commented 2 years ago

Looks like the latest Notion updates have broken even the newest forks of this project. collection.add_row() works fine on existing databases, but if you create a new database, collection comes back as NoneType.

knightjoel commented 2 years ago

Unsure what changed in the API, however after inspecting how the module is storing information about collections, I noted the collection_id is available via a different key. The linked patch works for me but I've only done very light testing. Care to give it a try?

jessecheu commented 2 years ago

@knightjoel Your fix works to solve the issue.