Fix fetch sales 2

This commit is contained in:
Urtzi Alfaro
2025-07-25 22:43:18 +02:00
parent e93089aaad
commit e49893e10a
3 changed files with 8 additions and 4 deletions

View File

@@ -410,8 +410,9 @@ class TrainingService:
try:
# Call data service to get sales data
async with httpx.AsyncClient() as client:
params = {
"tenant_id": tenant_id
params = {}
headers = {
"X-Tenant-ID": tenant_id
}
if hasattr(request, 'start_date') and request.start_date:
@@ -426,6 +427,7 @@ class TrainingService:
response = await client.get(
f"{settings.DATA_SERVICE_URL}/api/v1/sales/",
params=params,
headers=headers,
timeout=30.0
)