File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
supertokens_python/recipe/multitenancy Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 37
37
38
38
async def create_or_update_tenant (
39
39
tenant_id : Optional [str ],
40
- config : TenantConfig ,
40
+ config : Optional [ TenantConfig ] ,
41
41
user_context : Optional [Dict [str , Any ]] = None ,
42
42
) -> CreateOrUpdateTenantOkResult :
43
43
if user_context is None :
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ async def get_tenant_id(
166
166
async def create_or_update_tenant (
167
167
self ,
168
168
tenant_id : Optional [str ],
169
- config : TenantConfig ,
169
+ config : Optional [ TenantConfig ] ,
170
170
user_context : Dict [str , Any ],
171
171
) -> CreateOrUpdateTenantOkResult :
172
172
pass
Original file line number Diff line number Diff line change @@ -132,14 +132,14 @@ async def get_tenant_id(
132
132
async def create_or_update_tenant (
133
133
self ,
134
134
tenant_id : Optional [str ],
135
- config : TenantConfig ,
135
+ config : Optional [ TenantConfig ] ,
136
136
user_context : Dict [str , Any ],
137
137
) -> CreateOrUpdateTenantOkResult :
138
138
response = await self .querier .send_put_request (
139
139
NormalisedURLPath ("/recipe/multitenancy/tenant" ),
140
140
{
141
141
"tenantId" : tenant_id ,
142
- ** config .to_json (),
142
+ ** ( config .to_json () if config is not None else {} ),
143
143
},
144
144
)
145
145
return CreateOrUpdateTenantOkResult (
Original file line number Diff line number Diff line change 20
20
21
21
def create_or_update_tenant (
22
22
tenant_id : Optional [str ],
23
- config : TenantConfig ,
23
+ config : Optional [ TenantConfig ] ,
24
24
user_context : Optional [Dict [str , Any ]] = None ,
25
25
):
26
26
if user_context is None :
You can’t perform that action at this time.
0 commit comments