Public Access
fix: test-email actually sends; vote page pre-checks existing votes; lowercase MealPlanItemStatus everywhere
- /api/admin/test-email now calls get_email_backend().send() instead of only logging.
- /api/meals/vote/{id} GET now queries MealPlanVote and renders 'already voted' confirmation if found.
- api/meals.py: fix remaining uppercase MealPlanItemStatus enum ref (DENIED, APPROVED, PENDING).
- Fixes the 'all meals show as pending' status regression and the 'Error: Already voted' bug.
This commit is contained in:
@@ -182,7 +182,7 @@ def generate_meal_plan(
|
||||
recipe_id=scored_recipe.recipe_id,
|
||||
day_of_week=index + 1, # Mon=1, Tue=2, Wed=3 by default
|
||||
meal_type=MealType.DINNER,
|
||||
approval_status=MealPlanItemStatus.PENDING,
|
||||
approval_status=MealPlanItemStatus.pending,
|
||||
estimated_cost=scored_recipe.cost.total_cost,
|
||||
)
|
||||
db.add(item)
|
||||
|
||||
Reference in New Issue
Block a user