Browse Source

upgrade name logs

latapp 10 tháng trước cách đây
mục cha
commit
f860a1282c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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",