nagasurendra commited on
Commit
c182cc8
·
verified ·
1 Parent(s): 28162e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -1008,7 +1008,7 @@ def checkout():
1008
  try:
1009
  # Fetch the selected coupon (if any)
1010
  data = request.json
1011
- selected_coupon = data.get("selectedCoupon", "").strip() # Get selected coupon
1012
  print(f"Selected Coupon: {selected_coupon}") # Debugging selected coupon
1013
 
1014
  # Fetch cart items for the current user
 
1008
  try:
1009
  # Fetch the selected coupon (if any)
1010
  data = request.json
1011
+ selected_coupon = data.get("selectedCoupon", "").strip() if data.get("selectedCoupon") else None
1012
  print(f"Selected Coupon: {selected_coupon}") # Debugging selected coupon
1013
 
1014
  # Fetch cart items for the current user