frontend kínlódás

This commit is contained in:
Roo
2026-03-31 06:20:43 +00:00
parent 2508ae7452
commit c7cbe60976
46 changed files with 6091 additions and 136 deletions

View File

@@ -20,15 +20,16 @@ async def list_makes(
@router.get("/models", response_model=List[str])
async def list_models(
make: str,
vehicle_class: str = None,
db: AsyncSession = Depends(get_db),
current_user = Depends(deps.get_current_user)
):
"""2. Szint: Típusok listázása egy adott márkához."""
"""2. Szint: Típusok listázása egy adott márkához, opcionálisan vehicle_class szerint szűrve."""
# Handle empty or invalid parameters gracefully
if not make or make.strip() == "":
return []
models = await AssetService.get_models(db, make)
models = await AssetService.get_models(db, make, vehicle_class)
# Return empty list instead of 404 - frontend can handle empty dropdown
return models or []