Description
I'll preface this with "I don't think this is officially supported by the API" as I think it falls under "Utilities to support updating/creating collection schemas" which is currently a TODO.
When writing to a multiple select with options that aren't currently in the Collection's schema, the option isn't written, however, a new property with a "?" icon shows up in Notion.
Later on, any attempts to set any attribute in the collection results in this KeyError:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/notion/collection.py", line 425, in __setattr__ elif attname in self._get_property_slugs(): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/notion/collection.py", line 435, in _get_property_slugs slugs = [prop["slug"] for prop in self.schema] File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/notion/collection.py", line 414, in schema for prop in self.collection.get_schema_properties() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/notion/collection.py", line 169, in get_schema_properties prop = {"id": id, "slug": slugify(item["name"])} KeyError: 'name'
There's an easy fix and workaround for my usecase, since I have relatively few/set # of options in the multi select: