mirror of
https://github.com/langgenius/dify.git
synced 2026-01-08 07:14:14 +00:00
fix: query error
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user