Update order.py
Browse files
order.py
CHANGED
@@ -20,12 +20,11 @@ def order_summary():
|
|
20 |
ORDER BY CreatedDate DESC
|
21 |
LIMIT 1
|
22 |
""")
|
23 |
-
|
24 |
-
|
25 |
-
if not
|
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)}")
|