chroma
chroma copied to clipboard
When a collection is updated with an existing collection name, raises an Exception
Description of changes
Summarize the changes made by this PR.
- Improvements & Bug fixes
- Fixes #343
Test plan
How are these changes tested?
Added three api._modify tests:
- Update with a new name
- Update with new metadata
- Update with a name of an existing collection
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?
Here goes my first PR, sorry.
I just added the poor man's unique constraint implemented in create_collection.
Thank you so much! Will take a look.
Note for object oriented programming consistency: The client object should have the modify() method, not the collection object. The collection object can change its metadata attribute but not its own ID attribute, since that creates problems for client object which must maintain a list of unique collection objects.
Closing in favor of #519