fix: 兼容 corp_id 字段不存在 + 添加迁移 API
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
111
2026-01-24 10:23:19 +08:00
parent ab84f6b87d
commit 63e38ceb60
2 changed files with 31 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ async def list_tenants(
"id": t.id,
"code": t.code,
"name": t.name,
"corp_id": t.corp_id,
"corp_id": getattr(t, 'corp_id', None),
"contact_info": t.contact_info,
"status": t.status,
"expired_at": t.expired_at,
@@ -123,7 +123,7 @@ async def get_tenant(
"id": tenant.id,
"code": tenant.code,
"name": tenant.name,
"corp_id": tenant.corp_id,
"corp_id": getattr(tenant, 'corp_id', None),
"contact_info": tenant.contact_info,
"status": tenant.status,
"expired_at": tenant.expired_at,