Ver código fonte

fix(quota): 修复变量名覆盖导致 issue_batch_id 属性错误

alphah 2 semanas atrás
pai
commit
4f7d5bc82d

+ 3 - 3
backend/app/plugin/module_payment/expense/quota/service.py

@@ -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}")