feat: alcance temporal configurable en importador y fix multi-carrera en ORM (v3.8.3)
This commit is contained in:
@@ -27,6 +27,14 @@ def sync_google_sheets(
|
||||
current_user: User = Depends(get_current_user)
|
||||
):
|
||||
"""Ejecuta la sincronización con Google Sheets con filtros y selección granular."""
|
||||
date_from = payload.get('date_from')
|
||||
date_to = payload.get('date_to')
|
||||
if date_from and date_to and str(date_from).strip() > str(date_to).strip():
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_400_BAD_REQUEST,
|
||||
detail="La fecha de inicio (date_from) no puede ser posterior a la fecha de fin (date_to)."
|
||||
)
|
||||
|
||||
try:
|
||||
ip = request.client.host if request.client else '127.0.0.1'
|
||||
return dashboard_service.sync_google_sheets(payload, current_user=current_user, ip_address=ip)
|
||||
|
||||
Reference in New Issue
Block a user