Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -162,8 +162,6 @@ def generate_custom_dish():
|
|
162 |
# except Exception as e:
|
163 |
# return jsonify({"success": False, "error": str(e)}), 500
|
164 |
|
165 |
-
|
166 |
-
try:
|
167 |
if cart_item_result['totalSize'] > 0:
|
168 |
# If the custom dish is already in the cart, update the quantity and price
|
169 |
cart_item = cart_item_result['records'][0]
|
@@ -197,10 +195,10 @@ def generate_custom_dish():
|
|
197 |
cart_result = sf.Cart_Item__c.create(cart_item)
|
198 |
|
199 |
# Redirect to the cart page after successfully adding or updating the cart item
|
200 |
-
|
201 |
|
202 |
-
except Exception as e:
|
203 |
-
|
204 |
|
205 |
|
206 |
|
|
|
162 |
# except Exception as e:
|
163 |
# return jsonify({"success": False, "error": str(e)}), 500
|
164 |
|
|
|
|
|
165 |
if cart_item_result['totalSize'] > 0:
|
166 |
# If the custom dish is already in the cart, update the quantity and price
|
167 |
cart_item = cart_item_result['records'][0]
|
|
|
195 |
cart_result = sf.Cart_Item__c.create(cart_item)
|
196 |
|
197 |
# Redirect to the cart page after successfully adding or updating the cart item
|
198 |
+
return redirect(url_for("cart"))
|
199 |
|
200 |
+
except Exception as e:
|
201 |
+
return jsonify({"success": False, "error": str(e)}), 500
|
202 |
|
203 |
|
204 |
|