Fix fetch sales

This commit is contained in:
Urtzi Alfaro
2025-07-25 21:56:53 +02:00
parent f012f1bb14
commit e93089aaad
3 changed files with 5 additions and 6 deletions

View File

@@ -411,8 +411,7 @@ class TrainingService:
# Call data service to get sales data
async with httpx.AsyncClient() as client:
params = {
"tenant_id": tenant_id,
"include_all": True
"tenant_id": tenant_id
}
if hasattr(request, 'start_date') and request.start_date:
@@ -425,7 +424,7 @@ class TrainingService:
params["limit"] = limit
response = await client.get(
f"{settings.DATA_SERVICE_URL}/api/sales",
f"{settings.DATA_SERVICE_URL}/api/v1/sales/",
params=params,
timeout=30.0
)