nagasurendra commited on
Commit
7caf8fd
·
verified ·
1 Parent(s): 1f35c01

Update order.py

Browse files
Files changed (1) hide show
  1. order.py +3 -4
order.py CHANGED
@@ -20,12 +20,11 @@ def order_summary():
20
  ORDER BY CreatedDate DESC
21
  LIMIT 1
22
  """)
23
- order_records = result.get("records", [])
24
-
25
- if not order_records:
26
  return render_template("order.html", order=None)
27
 
28
- order = order_records[0] # Safely access the first record
29
  return render_template("order.html", order=order)
30
  except Exception as e:
31
  print(f"Error fetching order details: {str(e)}")
 
20
  ORDER BY CreatedDate DESC
21
  LIMIT 1
22
  """)
23
+ order = result.get("records", [])[0] if result.get("records") else None
24
+
25
+ if not order:
26
  return render_template("order.html", order=None)
27
 
 
28
  return render_template("order.html", order=order)
29
  except Exception as e:
30
  print(f"Error fetching order details: {str(e)}")