minwook-shin / notion-database

Python bindings for Notion Database API
https://pypi.org/project/notion-database/
GNU Lesser General Public License v3.0
137 stars 12 forks source link

Unable to update Database's properties #7

Closed SovnSkyrim closed 2 years ago

SovnSkyrim commented 2 years ago

Hi; I have the following code

PROPERTY = Properties() D.update_database(database_id=database_id, title="DB", add_properties=PROPERTY) print(pprint.pformat(D.properties_list)) The database_id and the Database itself are good; because the "D.properties_list" give me back all the properties in my print. But without the default property from your class. I also cannot find a way to check if the function "D.update_database" succeeded or not

This is the output of D.properties_list printed: [{'id': '%3BoW%60', 'name': 'Street Line 1', 'rich_text': {}, 'type': 'rich_text'}, {'id': '%3B%7DLp', 'name': 'Street Line 2', 'rich_text': {}, 'type': 'rich_text'}, {'id': 'DBzM', 'name': 'Customer', 'rich_text': {}, 'type': 'rich_text'}, {'id': 'Eps%7C', 'name': 'Status', 'rich_text': {}, 'type': 'rich_text'}, {'id': 'LkwZ', 'name': 'Postal Code', 'rich_text': {}, 'type': 'rich_text'}, {'id': 'L%7BQj', 'name': 'locality', 'rich_text': {}, 'type': 'rich_text'}, {'id': 'O%3AV%3F', 'name': 'Street Line 3', 'rich_text': {}, 'type': 'rich_text'}, {'id': 'OniY', 'name': 'Adress', 'rich_text': {}, 'type': 'rich_text'}, {'id': '%5CZ%5Cf', 'name': 'City', 'rich_text': {}, 'type': 'rich_text'}, {'id': '%60Q%7C_', 'name': 'Content', 'rich_text': {}, 'type': 'rich_text'}, {'id': '%60y%3B%7D', 'name': 'short_locality', 'rich_text': {}, 'type': 'rich_text'}, {'id': 'gGxD', 'name': 'Country', 'rich_text': {}, 'type': 'rich_text'}, {'id': 'pBA%7B', 'name': 'iso_code', 'rich_text': {}, 'type': 'rich_text'}, {'id': 'v%7BYP', 'name': 'Size', 'rich_text': {}, 'type': 'rich_text'}]