Răsfoiți Sursa

upgrade name logs

latapp 10 luni în urmă
părinte
comite
f860a1282c
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      main.py

+ 1 - 1
main.py

@@ -294,7 +294,7 @@ async def printer_order(order: OrderWeb):
             writer.writerow(['userName', 'table', 'orderDate', 'items'])
     with open('logs.csv', 'a', newline='') as f:
         writer = csv.writer(f)
-        writer.writerow([order.customerName, order.table, order.orderDate, items])
+        writer.writerow([order.customerName, order.table, order.orderDate, list(map(lambda item: item.name, items))])
 
 
 @app.post("/api/chat/completions",