# Specifying properties with multi-tenancy causes bug

**URL:** <https://forum.weaviate.io/t/specifying-properties-with-multi-tenancy-causes-bug/3946>\
**Category:** Support\
**Created:** [September 1, 2024, 4:57am UTC](https://forum.weaviate.io/t/specifying-properties-with-multi-tenancy-causes-bug/3946 "2024-09-01T04:57:11Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Tejas\_Sharma](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/tejas_sharma/32/2086_2.png) [@Tejas\_Sharma](https://forum.weaviate.io/u/Tejas_Sharma)\
**Post date:** [September 12, 2024, 4:22pm UTC](https://forum.weaviate.io/t/specifying-properties-with-multi-tenancy-causes-bug/3946/6 "2024-09-12T16:22:04Z")

</div>

Hi @DudaNogueira , aplogies for the delay, here’s the minimal reproducible code:

```auto
import uuid
import weaviate
import weaviate.classes as wvc
from weaviate.classes.query import Filter, MetadataQuery
from weaviate.classes.config import Configure, VectorDistances, Property, DataType
from weaviate.classes.tenants import Tenant
from datetime import datetime, timedelta
import pytz

try:
	# TODO: use different credentials for production
	# Best practice: store your credentials in environment variables
	wcd_url = ""
	wcd_api_key = ""

	client = weaviate.connect_to_weaviate_cloud(
		cluster_url=wcd_url, # Replace with your Weaviate Cloud URL
		auth_credentials=wvc.init.Auth.api_key(wcd_api_key), # Replace with your Weaviate Cloud key
	)
except Exception as e:
	print(e)
	# exit
	pass

try:
	# For all objects
	nodes_collection = client.collections.create(
		name="Nodes",
		vectorizer_config=wvc.config.Configure.Vectorizer.none(),
		vector_index_config=Configure.VectorIndex.hnsw(
			distance_metric=VectorDistances.COSINE
		),
		# Multi tenancy to separate each user's data
		multi_tenancy_config=Configure.multi_tenancy(enabled=True, auto_tenant_creation=True, auto_tenant_activation=True),
		inverted_index_config=Configure.inverted_index( 
			index_null_state=True,
        	index_property_length=True,
			index_timestamps=True
		)
		# Specify some properties beforehand to set right data type (i.e. obj[] instead of string[])
		properties=[
			Property(name="tags", data_type=DataType.OBJECT_ARRAY),
		]
	)
except:
	nodes_collection = client.collections.get("Nodes")

try:
	# Create tenant on Node
	nodes_collection.tenants.create(
		tenants=[
			Tenant(name="tenantA"),
			Tenant(name="tenantB"),
		]
	)
except:
	pass

# Will cause an error
nodes_collection.with_tenant('tenantA').data.insert(
	vector=[0.0] * 384,
	properties={'lastUpdateDeviceId': 'device-78C24351-F40A-4E37-8953-F003FA474877'},
	uuid=str(uuid.uuid4())
)

```

---

_[View the full topic](https://forum.weaviate.io/t/specifying-properties-with-multi-tenancy-causes-bug/3946)._
