nagasurendra commited on
Commit
79a9578
·
verified ·
1 Parent(s): f358ba9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -5
app.py CHANGED
@@ -136,8 +136,6 @@ def generate_custom_dish():
136
 
137
  cart_item_update = sf.Cart_Item__c.update(cart_item['Id'], updated_cart_item)
138
 
139
- if not cart_item_update.get('success'):
140
- return jsonify({"success": False, "error": "Failed to update cart item"}), 500
141
  else:
142
  # If the custom dish is not in the cart, create a new cart item
143
  cart_item = {
@@ -154,9 +152,6 @@ def generate_custom_dish():
154
  # Insert the custom dish as a Cart_Item__c record in Salesforce
155
  cart_result = sf.Cart_Item__c.create(cart_item)
156
 
157
- if not cart_result.get('success'):
158
- return jsonify({"success": False, "error": "Failed to add custom dish to the cart"}), 500
159
-
160
  # Redirect to the cart page after successfully adding or updating the cart item
161
  return redirect(url_for("cart"))
162
 
 
136
 
137
  cart_item_update = sf.Cart_Item__c.update(cart_item['Id'], updated_cart_item)
138
 
 
 
139
  else:
140
  # If the custom dish is not in the cart, create a new cart item
141
  cart_item = {
 
152
  # Insert the custom dish as a Cart_Item__c record in Salesforce
153
  cart_result = sf.Cart_Item__c.create(cart_item)
154
 
 
 
 
155
  # Redirect to the cart page after successfully adding or updating the cart item
156
  return redirect(url_for("cart"))
157