fix: raise
This commit is contained in:
parent
ca5b29438b
commit
148747c3c6
@ -111,7 +111,7 @@ class ForgotPasswordResetApi(Resource):
|
|||||||
tenant = TenantService.get_join_tenants(account)
|
tenant = TenantService.get_join_tenants(account)
|
||||||
if not tenant:
|
if not tenant:
|
||||||
if not dify_config.ALLOW_CREATE_WORKSPACE:
|
if not dify_config.ALLOW_CREATE_WORKSPACE:
|
||||||
return NotAllowedCreateWorkspace()
|
raise NotAllowedCreateWorkspace()
|
||||||
else:
|
else:
|
||||||
tenant = TenantService.create_tenant(f"{account.name}'s Workspace")
|
tenant = TenantService.create_tenant(f"{account.name}'s Workspace")
|
||||||
TenantService.create_tenant_member(tenant, account, role="owner")
|
TenantService.create_tenant_member(tenant, account, role="owner")
|
||||||
|
@ -135,7 +135,7 @@ class EmailCodeLoginApi(Resource):
|
|||||||
tenant = TenantService.get_join_tenants(account)
|
tenant = TenantService.get_join_tenants(account)
|
||||||
if not tenant:
|
if not tenant:
|
||||||
if not dify_config.ALLOW_CREATE_WORKSPACE:
|
if not dify_config.ALLOW_CREATE_WORKSPACE:
|
||||||
return NotAllowedCreateWorkspace()
|
raise NotAllowedCreateWorkspace()
|
||||||
else:
|
else:
|
||||||
tenant = TenantService.create_tenant(f"{account.name}'s Workspace")
|
tenant = TenantService.create_tenant(f"{account.name}'s Workspace")
|
||||||
TenantService.create_tenant_member(tenant, account, role="owner")
|
TenantService.create_tenant_member(tenant, account, role="owner")
|
||||||
|
Loading…
Reference in New Issue
Block a user