Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,10 +42,11 @@ def get_ingredients():
|
|
42 |
|
43 |
if dietary_preference == 'veg':
|
44 |
print("Fetching ingredients for Vegetarian...") # Debug when fetching vegetarian ingredients
|
45 |
-
soql = "SELECT Name, Image_URL__c FROM Sector_Detail__c WHERE Category__c
|
46 |
elif dietary_preference == 'non-vegetarian':
|
47 |
print("Fetching ingredients for Non-Vegetarian...") # Debug when fetching non-vegetarian ingredients
|
48 |
-
soql = "SELECT Name, Image_URL__c FROM Sector_Detail__c WHERE Category__c
|
|
|
49 |
else:
|
50 |
print("Invalid dietary preference received.") # Debug for invalid dietary preference
|
51 |
return jsonify({"error": "Invalid dietary preference."}), 400
|
|
|
42 |
|
43 |
if dietary_preference == 'veg':
|
44 |
print("Fetching ingredients for Vegetarian...") # Debug when fetching vegetarian ingredients
|
45 |
+
soql = "SELECT Name, Image_URL__c FROM Sector_Detail__c WHERE Category__c IN ('Veg', 'Both') LIMIT 200"
|
46 |
elif dietary_preference == 'non-vegetarian':
|
47 |
print("Fetching ingredients for Non-Vegetarian...") # Debug when fetching non-vegetarian ingredients
|
48 |
+
soql = "SELECT Name, Image_URL__c FROM Sector_Detail__c WHERE Category__c IN ('Non-Veg', 'Both') LIMIT 200"
|
49 |
+
|
50 |
else:
|
51 |
print("Invalid dietary preference received.") # Debug for invalid dietary preference
|
52 |
return jsonify({"error": "Invalid dietary preference."}), 400
|