Add accident to reset sections
This commit is contained in:
+1
-1
@@ -1936,7 +1936,7 @@ async def reset_section(
|
|||||||
db: Session = Depends(get_db),
|
db: Session = Depends(get_db),
|
||||||
):
|
):
|
||||||
"""Reset (truncate) a specific data section. Creates auto-backup first."""
|
"""Reset (truncate) a specific data section. Creates auto-backup first."""
|
||||||
valid = {"attendance": AttendanceRecord, "holidays": Holiday, "leaves": LeaveRecord}
|
valid = {"attendance": AttendanceRecord, "holidays": Holiday, "leaves": LeaveRecord, "accident": Accident}
|
||||||
if section not in valid:
|
if section not in valid:
|
||||||
raise HTTPException(status_code=400, detail=f"Unknown section: {section}")
|
raise HTTPException(status_code=400, detail=f"Unknown section: {section}")
|
||||||
# Auto-backup before reset
|
# Auto-backup before reset
|
||||||
|
|||||||
Reference in New Issue
Block a user