Files
bakery-ia/services
Urtzi Alfaro 35ae23b381 Fix forecasting clone endpoint for demo sessions
Fixed two critical issues preventing forecast data from being cloned:

1. **Missing batch_name field**: The fixture uses `batch_id` but the
   PredictionBatch model requires `batch_name` (NOT NULL constraint).
   Added field mapping to handle batch_id -> batch_name conversion.

2. **UUID type mismatch**: The fixture's `product_id` is a string but
   the Forecast model expects `inventory_product_id` as UUID type.
   Added conversion from string to UUID.

3. **Field mappings added**:
   - batch_id -> batch_name
   - total_forecasts -> total_products
   - created_at -> requested_at (fallback)
   - Calculated completed_products from status

These fixes enable the forecasting service to successfully clone all
28 forecasts from the fixture file, unlocking demand forecasting
AI insights in demo sessions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 07:39:13 +01:00
..
2025-12-05 20:07:01 +01:00
2025-12-15 21:14:22 +01:00
2025-12-14 11:58:14 +01:00
2025-12-15 13:39:33 +01:00
2025-12-13 23:57:54 +01:00
2025-12-05 20:07:01 +01:00
2025-12-15 21:14:22 +01:00
2025-12-05 20:07:01 +01:00
2025-12-15 21:14:22 +01:00
2025-12-14 21:39:53 +01:00
2025-12-13 23:57:54 +01:00
2025-12-15 21:14:22 +01:00
2025-12-15 21:14:22 +01:00
2025-12-14 19:05:37 +01:00
2025-12-14 16:04:16 +01:00
2025-12-14 11:58:14 +01:00
2025-12-14 16:04:16 +01:00
2025-12-13 23:57:54 +01:00