From 08ba4cbca9b8ff2eabf99cf4f05b0082af37443b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IT=E7=8B=97?= Date: Tue, 21 Jul 2026 12:49:44 +0800 Subject: [PATCH] Fix: add missing db Session dependency to reset_section --- backend/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/main.py b/backend/main.py index 035cf04..d3911a5 100644 --- a/backend/main.py +++ b/backend/main.py @@ -1933,6 +1933,7 @@ async def restore_backup( async def reset_section( section: str, current_user: User = Depends(get_current_admin), + db: Session = Depends(get_db), ): """Reset (truncate) a specific data section. Creates auto-backup first.""" valid = {"attendance": AttendanceRecord, "holidays": Holiday, "leaves": LeaveRecord}