Spaces:
Sleeping
Sleeping
Update customdish.py
#1
by
geethareddy
- opened
- customdish.py +3 -2
customdish.py
CHANGED
@@ -31,7 +31,7 @@ def generate_custom_dish():
|
|
31 |
"both"
|
32 |
|
33 |
# Query to check if the dish already exists in Salesforce (Custom_Dish__c object)
|
34 |
-
existing_dish_query = f"SELECT Id, Name, Price__c, Image1__c, Image2__c, Description__c, Veg_NonVeg__c FROM Custom_Dish__c WHERE Name = '{dish_name}'"
|
35 |
existing_dish_result = sf.query(existing_dish_query)
|
36 |
|
37 |
if existing_dish_result['totalSize'] > 0:
|
@@ -52,7 +52,8 @@ def generate_custom_dish():
|
|
52 |
'Veg_NonVeg__c': category,
|
53 |
'Section__c': 'Customized dish',
|
54 |
'Total_Ordered__c': 0
|
55 |
-
|
|
|
56 |
|
57 |
# Insert the custom dish into Salesforce (Custom_Dish__c object)
|
58 |
result = sf.Custom_Dish__c.create(custom_dish)
|
|
|
31 |
"both"
|
32 |
|
33 |
# Query to check if the dish already exists in Salesforce (Custom_Dish__c object)
|
34 |
+
existing_dish_query = f"SELECT Id, Name, Price__c, Image1__c, Image2__c, Description__c, Veg_NonVeg__c ,Ingredients_List__c FROM Custom_Dish__c WHERE Name = '{dish_name}'"
|
35 |
existing_dish_result = sf.query(existing_dish_query)
|
36 |
|
37 |
if existing_dish_result['totalSize'] > 0:
|
|
|
52 |
'Veg_NonVeg__c': category,
|
53 |
'Section__c': 'Customized dish',
|
54 |
'Total_Ordered__c': 0
|
55 |
+
'Ingredients_List__c':Ingredients List
|
56 |
+
|
57 |
|
58 |
# Insert the custom dish into Salesforce (Custom_Dish__c object)
|
59 |
result = sf.Custom_Dish__c.create(custom_dish)
|