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

@ -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()