nagasurendra commited on
Commit
e89028e
·
verified ·
1 Parent(s): 4e432b5

Update menu.py

Browse files
Files changed (1) hide show
  1. menu.py +6 -4
menu.py CHANGED
@@ -9,12 +9,14 @@ sf = get_salesforce_connection()
9
  @menu_blueprint.route("/menu", methods=["GET", "POST"])
10
  def menu():
11
  selected_category = request.args.get("category", "All")
12
- is_veg_only = request.args.get("veg") == 'on' # Check if the 'veg' toggle is on
13
-
 
 
14
  if is_veg_only:
15
  selected_category = "Veg" # If the veg toggle is on, show only Veg items
16
- else:
17
- selected_category = "All" # If the veg toggle is off, show all items
18
 
19
  user_email = session.get('user_email')
20
 
 
9
  @menu_blueprint.route("/menu", methods=["GET", "POST"])
10
  def menu():
11
  selected_category = request.args.get("category", "All")
12
+
13
+ # Check if the "Veg" toggle is on
14
+ is_veg_only = request.args.get("veg") == 'on' # Veg toggle on
15
+
16
  if is_veg_only:
17
  selected_category = "Veg" # If the veg toggle is on, show only Veg items
18
+ elif selected_category != "Customized Dish":
19
+ selected_category = "All" # Default to All if Veg toggle is off and Customized Dish is not selected
20
 
21
  user_email = session.get('user_email')
22