Skip to content

Commit a400f78

Browse files
committed
fix: Make config optional
1 parent 3332b92 commit a400f78

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

supertokens_python/recipe/multitenancy/asyncio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
async def create_or_update_tenant(
3939
tenant_id: Optional[str],
40-
config: TenantConfig,
40+
config: Optional[TenantConfig],
4141
user_context: Optional[Dict[str, Any]] = None,
4242
) -> CreateOrUpdateTenantOkResult:
4343
if user_context is None:

supertokens_python/recipe/multitenancy/interfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ async def get_tenant_id(
166166
async def create_or_update_tenant(
167167
self,
168168
tenant_id: Optional[str],
169-
config: TenantConfig,
169+
config: Optional[TenantConfig],
170170
user_context: Dict[str, Any],
171171
) -> CreateOrUpdateTenantOkResult:
172172
pass

supertokens_python/recipe/multitenancy/recipe_implementation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ async def get_tenant_id(
132132
async def create_or_update_tenant(
133133
self,
134134
tenant_id: Optional[str],
135-
config: TenantConfig,
135+
config: Optional[TenantConfig],
136136
user_context: Dict[str, Any],
137137
) -> CreateOrUpdateTenantOkResult:
138138
response = await self.querier.send_put_request(
139139
NormalisedURLPath("/recipe/multitenancy/tenant"),
140140
{
141141
"tenantId": tenant_id,
142-
**config.to_json(),
142+
**(config.to_json() if config is not None else {}),
143143
},
144144
)
145145
return CreateOrUpdateTenantOkResult(

supertokens_python/recipe/multitenancy/syncio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
def create_or_update_tenant(
2222
tenant_id: Optional[str],
23-
config: TenantConfig,
23+
config: Optional[TenantConfig],
2424
user_context: Optional[Dict[str, Any]] = None,
2525
):
2626
if user_context is None:

0 commit comments

Comments
 (0)