geethareddy commited on
Commit
f8d0e6e
·
verified ·
1 Parent(s): 0257163

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -39,10 +39,11 @@ def get_ingredients():
39
 
40
  dietary_preference = request.json.get('dietary_preference', '').lower()
41
 
42
- # Validate and map dietary preference to SOQL condition
43
  preference_map = {
44
  'vegetarian': "Category__c = 'Veg'",
45
- 'non-vegetarian': "Category__c = 'Non-Veg'"
 
46
  }
47
  condition = preference_map.get(dietary_preference, "1=1") # Default to all if invalid
48
 
 
39
 
40
  dietary_preference = request.json.get('dietary_preference', '').lower()
41
 
42
+ # Map dietary preference to SOQL condition
43
  preference_map = {
44
  'vegetarian': "Category__c = 'Veg'",
45
+ 'non-vegetarian': "Category__c = 'Non-Veg'",
46
+ 'both': "1=1" # No category filter for "Both"
47
  }
48
  condition = preference_map.get(dietary_preference, "1=1") # Default to all if invalid
49