Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] .tenants.create with a string argument loops through the string and creates multiple tenants #1117

Closed
databyjp opened this issue Jun 21, 2024 · 0 comments · Fixed by #1118
Labels
bug Something isn't working

Comments

@databyjp
Copy link
Contributor

I suspect it should create just the one tenant?

Reproducible example - Weaviate 1.25.4; Client 4.6.5

import weaviate
import os
from weaviate.classes.config import Configure

client = weaviate.connect_to_local()

mt_collection_name = "MultiTenantCollection"

client.collections.delete(mt_collection_name)

mt_collection = client.collections.create(
    name=mt_collection_name,  # e.g. "UserNote"
    multi_tenancy_config=Configure.multi_tenancy(),
)

assert mt_collection.config.get().multi_tenancy_config.enabled is True

mt_collection.tenants.create("bob")
print(mt_collection.tenants.get().keys())
assert len(mt_collection.tenants.get()) == 1  # This should be 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant