fix: query error

This commit is contained in:
Joe
2024-09-27 14:56:00 +08:00
parent 51e7c17bae
commit 6e5fd6710c
2 changed files with 2 additions and 4 deletions

View File

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

View File

@@ -183,7 +183,7 @@ class AccountService:
TenantService.create_owner_tenant_if_not_exist(account=account)
else:
# 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")
account.current_tenant = tenant
db.session.commit()