Spaces:
Running

axeronis commited on
Commit
2621961
·
1 Parent(s): d54be21

fix: AsyncSession exec -> execute in demo.py smart_correct

Browse files
Files changed (1) hide show
  1. backend/app/api/demo.py +4 -4
backend/app/api/demo.py CHANGED
@@ -513,16 +513,16 @@ async def smart_correct(
513
  playbook = ai_settings.get("playbook", {})
514
 
515
  # Fetch Products (catalog)
516
- products_result = await session.exec(
517
  select(Product).where(Product.tenant_id == tenant.id, Product.is_active == True).limit(20)
518
  )
519
- products = products_result.all()
520
 
521
  # Fetch Services (booking)
522
- services_result = await session.exec(
523
  select(Service).where(Service.tenant_id == tenant.id, Service.is_active == True).limit(20)
524
  )
525
- services = services_result.all()
526
 
527
  # Build products list
528
  products_text = ""
 
513
  playbook = ai_settings.get("playbook", {})
514
 
515
  # Fetch Products (catalog)
516
+ products_result = await session.execute(
517
  select(Product).where(Product.tenant_id == tenant.id, Product.is_active == True).limit(20)
518
  )
519
+ products = products_result.scalars().all()
520
 
521
  # Fetch Services (booking)
522
+ services_result = await session.execute(
523
  select(Service).where(Service.tenant_id == tenant.id, Service.is_active == True).limit(20)
524
  )
525
+ services = services_result.scalars().all()
526
 
527
  # Build products list
528
  products_text = ""