refactor: change optional parameters to required for alert creation route
taylorwalton committed
Dec 4, 2025 at 09:02 UTC
b2019df4e2f6d6b96ccf34e667c742e41ef635f0
1 file changed
+2
-2
backend/app/incidents/routes/incident_alert.py
+2
-2
@@ -212,8 +212,8 @@ async def create_alert_manual_route(
212
description="Is invoked by the scheduler to create an incident alert in CoPilot",
213
)
214
async def create_alert_auto_route(
215
- batch_size: Optional[int] = Query(100, ge=10, le=500, description="Number of alerts to process per batch"),
216
- max_batches: Optional[int] = Query(10, ge=1, le=50, description="Maximum number of batches to process in one run"),
215
+ batch_size: int = Query(default=100, ge=10, le=500, description="Number of alerts to process per batch"),
216
+ max_batches: int = Query(default=10, ge=1, le=50, description="Maximum number of batches to process in one run"),
217
session: AsyncSession = Depends(get_db),
218
) -> AutoCreateAlertResponse:
219
"""