chroma icon indicating copy to clipboard operation
chroma copied to clipboard

When a collection is updated with an existing collection name, raises an Exception

Open nsanta opened this issue 2 years ago • 3 comments

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?

nsanta avatar Apr 13 '23 18:04 nsanta

Here goes my first PR, sorry.

I just added the poor man's unique constraint implemented in create_collection.

nsanta avatar Apr 13 '23 18:04 nsanta

Thank you so much! Will take a look.

HammadB avatar Apr 13 '23 18:04 HammadB

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.

naynaly10 avatar Apr 16 '23 02:04 naynaly10

Closing in favor of #519

HammadB avatar May 11 '23 15:05 HammadB