@@ -26,9 +26,9 @@ def create(
2626 class_name :,
2727 description : nil ,
2828 properties : nil ,
29- multi_tenant : nil ,
30- auto_tenant_creation : nil ,
31- auto_tenant_activation : nil ,
29+ multi_tenant : false ,
30+ auto_tenant_creation : false ,
31+ auto_tenant_activation : false ,
3232 vector_index_type : nil ,
3333 vector_index_config : nil ,
3434 vectorizer : nil ,
@@ -45,13 +45,15 @@ def create(
4545 req . body [ "vectorizer" ] = vectorizer unless vectorizer . nil?
4646 req . body [ "moduleConfig" ] = module_config unless module_config . nil?
4747 req . body [ "properties" ] = properties unless properties . nil?
48- if multi_tenant . is_a? ( Hash )
49- req . body [ "multiTenancyConfig" ] = multi_tenant
50- elsif !multi_tenant . nil?
51- req . body [ "multiTenancyConfig" ] = { enabled : true }
52- req . body [ "multiTenancyConfig" ] . merge! ( autoTenantCreation : true ) unless auto_tenant_creation . nil?
53- req . body [ "multiTenancyConfig" ] . merge! ( autoTenantActivation : true ) unless auto_tenant_activation . nil?
48+
49+ if multi_tenant
50+ req . body [ "multiTenancyConfig" ] = {
51+ enabled : multi_tenant ,
52+ autoTenantCreation : auto_tenant_creation ,
53+ autoTenantActivation : auto_tenant_activation
54+ }
5455 end
56+
5557 req . body [ "invertedIndexConfig" ] = inverted_index_config unless inverted_index_config . nil?
5658 req . body [ "replicationConfig" ] = replication_config unless replication_config . nil?
5759 end
0 commit comments