Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -413,9 +413,12 @@ def update_quantity():
|
|
| 413 |
|
| 414 |
# Retrieve first matching record
|
| 415 |
cart_item_id = cart_items[0]['Id']
|
| 416 |
-
base_price = cart_items[0]
|
| 417 |
addons_price = cart_items[0].get('Add_Ons_Price__c', 0)
|
| 418 |
print(base_price)
|
|
|
|
|
|
|
|
|
|
| 419 |
# Calculate new item price
|
| 420 |
new_item_price = (base_price * quantity) + addons_price
|
| 421 |
print(new_item_price)
|
|
|
|
| 413 |
|
| 414 |
# Retrieve first matching record
|
| 415 |
cart_item_id = cart_items[0]['Id']
|
| 416 |
+
base_price = cart_items[0].get('Base_Price__c', 0)
|
| 417 |
addons_price = cart_items[0].get('Add_Ons_Price__c', 0)
|
| 418 |
print(base_price)
|
| 419 |
+
|
| 420 |
+
if base_price is None:
|
| 421 |
+
base_price = 0
|
| 422 |
# Calculate new item price
|
| 423 |
new_item_price = (base_price * quantity) + addons_price
|
| 424 |
print(new_item_price)
|