Improve training test 2

This commit is contained in:
Urtzi Alfaro
2025-07-29 12:01:56 +02:00
parent ebffc65b62
commit ef62f05031
2 changed files with 9 additions and 1 deletions

View File

@@ -51,6 +51,14 @@ async def verify_tenant_access(
db: AsyncSession = Depends(get_db)
):
"""Verify if user has access to tenant - Called by Gateway"""
# Check if this is a service request
if user_id in ["training-service", "data-service", "forecasting-service"]:
# Services have access to all tenants for their operations
return TenantAccessResponse(
has_access=True,
role="service",
permissions=["read", "write"]
)
try:
access_info = await TenantService.verify_user_access(user_id, tenant_id, db)

View File

@@ -38,7 +38,7 @@ class DateAlignmentService:
"""
def __init__(self):
self.MAX_TRAINING_RANGE_DAYS = 365 # Maximum training data range
self.MAX_TRAINING_RANGE_DAYS = 730 # Maximum training data range
self.MIN_TRAINING_RANGE_DAYS = 30 # Minimum viable training data
def validate_and_align_dates(