|
|
@@ -455,9 +455,9 @@ class QuotaService:
|
|
|
QuotaModel.institution_id == data.institution_id,
|
|
|
QuotaModel.quota_id.is_(None),
|
|
|
)
|
|
|
- result = await auth.db.execute(clean_stmt)
|
|
|
- if result.rowcount:
|
|
|
- log.info(f"手工发放 - 清理 {result.rowcount} 条陈旧记录(institution_id={data.institution_id})")
|
|
|
+ del_result = await auth.db.execute(clean_stmt)
|
|
|
+ if del_result.rowcount:
|
|
|
+ log.info(f"手工发放 - 清理 {del_result.rowcount} 条陈旧记录(institution_id={data.institution_id})")
|
|
|
await auth.db.flush()
|
|
|
except Exception as e:
|
|
|
log.warning(f"手工发放 - 清理陈旧记录失败(不影响发放): {e}")
|