fix: query error

pull/8904/head
Joe 2 years ago
parent 51e7c17bae
commit 6e5fd6710c

@ -45,9 +45,7 @@ class EmailOrPasswordMismatchError(BaseHTTPException):
class EmailPasswordLoginLimitError(BaseHTTPException): class EmailPasswordLoginLimitError(BaseHTTPException):
error_code = "email_code_login_limit" error_code = "email_code_login_limit"
description = ( description = "The account was locked for 24 hours because the password was entered too many times."
"The account was locked for 24 hours because the password was entered too many times."
)
code = 429 code = 429

@ -183,7 +183,7 @@ class AccountService:
TenantService.create_owner_tenant_if_not_exist(account=account) TenantService.create_owner_tenant_if_not_exist(account=account)
else: else:
# SElF_HOST just have one tenant # SElF_HOST just have one tenant
tenant = Tenant.query.filter_by(id=1).first() tenant = Tenant.query.first()
TenantService.create_tenant_member(tenant, account, role="user") TenantService.create_tenant_member(tenant, account, role="user")
account.current_tenant = tenant account.current_tenant = tenant
db.session.commit() db.session.commit()

Loading…
Cancel
Save