|
|
@@ -155,6 +155,15 @@ async def detail_quota_controller(
|
|
|
stmt = select(QuotaModel).where(QuotaModel.quota_id == quota_id)
|
|
|
result = await auth.db.execute(stmt)
|
|
|
quota = result.scalar_one_or_none()
|
|
|
+ # quota_id 未回填时按数据库 id 查找
|
|
|
+ if not quota:
|
|
|
+ try:
|
|
|
+ local_id = int(quota_id)
|
|
|
+ stmt = select(QuotaModel).where(QuotaModel.id == local_id)
|
|
|
+ result = await auth.db.execute(stmt)
|
|
|
+ quota = result.scalar_one_or_none()
|
|
|
+ except (ValueError, TypeError):
|
|
|
+ pass
|
|
|
if quota:
|
|
|
return SuccessResponse(data={
|
|
|
"id": quota.id,
|