Start fixing forecast service API 11

This commit is contained in:
Urtzi Alfaro
2025-07-29 18:52:56 +02:00
parent 07872f50d0
commit 4fb5bde7f8

View File

@@ -565,19 +565,9 @@ echo ""
log_step "5.1. Testing basic dashboard functionality" log_step "5.1. Testing basic dashboard functionality"
# Get a real product name from CSV (fix the product extraction) # forecast request with proper schema
FIRST_PRODUCT=$(head -2 "$REAL_CSV_FILE" | tail -1 | cut -d',' -f3 | sed 's/"//g' | head -1)
if [ -z "$FIRST_PRODUCT" ]; then
FIRST_PRODUCT="Pan Integral" # Fallback product name
log_warning "Could not extract product from CSV, using fallback: $FIRST_PRODUCT"
else
log_success "Using product from CSV: $FIRST_PRODUCT"
fi
# CORRECTED forecast request with proper schema
FORECAST_REQUEST="{ FORECAST_REQUEST="{
\"product_name\": \"$FIRST_PRODUCT\", \"product_name\": \"pan\",
\"forecast_date\": \"2025-07-30\", \"forecast_date\": \"2025-07-30\",
\"forecast_days\": 1, \"forecast_days\": 1,
\"location\": \"madrid_centro\", \"location\": \"madrid_centro\",