nagasurendra commited on
Commit
5f60b66
·
verified ·
1 Parent(s): 20f0433

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -285,18 +285,18 @@ def menu():
285
 
286
  # Filter categories dynamically
287
  categories = {item.get("Veg_NonVeg__c").capitalize() for item in food_items if item.get("Veg_NonVeg__c")}
288
- categories = {"Veg", "Non-Veg"} # Ensure valid categories only
289
 
290
  # Filter food items based on the selected category
291
  if selected_category == "Veg":
292
  food_items = [item for item in food_items if item.get("Veg_NonVeg__c") in ["Veg", "both"]]
293
- elif selected_category == "Non-Veg":
294
  food_items = [item for item in food_items if item.get("Veg_NonVeg__c") in ["Non veg", "both"]]
295
 
296
  except Exception as e:
297
  print(f"Error fetching menu data: {str(e)}")
298
  food_items = []
299
- categories = {"All", "Veg", "Non-Veg"} # Default categories on error
300
  referral_code = 'N/A'
301
  reward_points = 0
302
 
 
285
 
286
  # Filter categories dynamically
287
  categories = {item.get("Veg_NonVeg__c").capitalize() for item in food_items if item.get("Veg_NonVeg__c")}
288
+ categories = {"Veg", "Non veg"} # Ensure valid categories only
289
 
290
  # Filter food items based on the selected category
291
  if selected_category == "Veg":
292
  food_items = [item for item in food_items if item.get("Veg_NonVeg__c") in ["Veg", "both"]]
293
+ elif selected_category == "Non veg":
294
  food_items = [item for item in food_items if item.get("Veg_NonVeg__c") in ["Non veg", "both"]]
295
 
296
  except Exception as e:
297
  print(f"Error fetching menu data: {str(e)}")
298
  food_items = []
299
+ categories = {"All", "Veg", "Non veg"} # Default categories on error
300
  referral_code = 'N/A'
301
  reward_points = 0
302