Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -73,7 +73,6 @@ def menu():
|
|
73 |
selected_category = request.args.get("category", "All")
|
74 |
user_id = session.get('user_id')
|
75 |
if not user_id:
|
76 |
-
print("User not logged in. Redirecting to login.")
|
77 |
return redirect(url_for('login')) # Redirect to login if user_id is not in session
|
78 |
|
79 |
try:
|
@@ -81,7 +80,6 @@ def menu():
|
|
81 |
result = sf.query(query)
|
82 |
food_items = result['records'] if 'records' in result else []
|
83 |
categories = {item['Category__c'] for item in food_items if 'Category__c' in item}
|
84 |
-
selected_category = request.args.get("category", "All")
|
85 |
if selected_category != "All":
|
86 |
food_items = [item for item in food_items if item.get("Category__c") == selected_category]
|
87 |
except Exception as e:
|
|
|
73 |
selected_category = request.args.get("category", "All")
|
74 |
user_id = session.get('user_id')
|
75 |
if not user_id:
|
|
|
76 |
return redirect(url_for('login')) # Redirect to login if user_id is not in session
|
77 |
|
78 |
try:
|
|
|
80 |
result = sf.query(query)
|
81 |
food_items = result['records'] if 'records' in result else []
|
82 |
categories = {item['Category__c'] for item in food_items if 'Category__c' in item}
|
|
|
83 |
if selected_category != "All":
|
84 |
food_items = [item for item in food_items if item.get("Category__c") == selected_category]
|
85 |
except Exception as e:
|